Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Adams_'s avatar

Laravel Filament List Record page loading very very slow

I have this courses table with over 3000 rows, I am using the Filament Admin panel to display them and it seems by default filament is getting all the rows from the table when filtering data or just loading the page which is making the page load or filter data very slow, sometimes it takes 1 minutes or more to load the page and about the same time to filter data, I am asking how do I solve this problem with filament, from the filament documentation I can customize the eloquent query with this method

 protected function getTableQuery(): Builder
{
     return parent::getTableQuery()->withoutGlobalScopes();
}

how do I use the chunk method in laravel with filament to customize the query to fetch 500 records at a time instead of the whole table? any help is appreciated

0 likes
1 reply
rondevz's avatar

From what I understand, the chunk method allows you to query a large dataset and take an action (as insert - update - delete) on that data chunk by chunk.. I believe pagination should do the work, according to Filament documentation the tables include default pagination Filament Table Pagination Docs.

It may also be a good time to look for optimizations in the table by adding indixes or in the query itself, I know that it is possible to select the columns to display by query.

1 like

Please or to participate in this conversation.