table group only results in querying all records
This will be an issue if we have millions of records
10 Replies
anyone?
Hello, you can use the methods
query
or modifyQueryUsing
of the table for example call a the scope of model that you load in the resource
public static function table(Table $table): Table
{
return $table->modifyQueryUsing(fn (Builder $query) => $query->balanceDays())
->query(function () {
$query->where('active','=',true)
})
->columns([
Tables\Columns\TextColumn::make('user_id_balance')
->alignRight()
->label('User')
I don't even understand what's the issue
When you enable the ->groupOnly(), you query all the models, provlematic when you have thousands of records
So how do expect grouping to work otherwise?
I think since this is group only, we can just select status, sum(), avg() from records group by status
Instead of query all the records
You still need to group them .
But you are talking about summarizers now or what?
Inthink its best to see the repo i submitted to demonstrate it
GitHub
Group Only Table results in table querying all records · Issue #136...
Package filament/filament Package Version v3.2.40 Laravel Version v11.17.0 Livewire Version v3.5.4 PHP Version PHP 8.3.9 Problem description The app timeout when accessing Orders menu Expected beha...
GitHub
GitHub - sawirricardo/filafun
Contribute to sawirricardo/filafun development by creating an account on GitHub.