APY / APYDataGridBundle

Symfony Datagrid Bundle
MIT License
492 stars 344 forks source link

Table very slow with a lot of data #1036

Closed Jiizen closed 5 years ago

Jiizen commented 5 years ago

Hello.

Sorry for disturbing. I have a big problem of performance.

I have about 300'000 rows. At begin, it was a view but we had problems of performance. Now, I try to use my entity as source and it was okay until the need to count elements. If I have data about actors, for example, I would to count the number of movies played by each actor.

I tried the DQL function to count : field="movies.id:count". It never loaded...

I finally tried to manipulate my query : $source->manipulateQuery( function ($query) use ($tableAlias) { $query ->leftJoin($tableAlias.'.movies', 'movies') ->addSelect('count(movies) as nbMovies') ->groupBy('movies'); } ); ... and it's the same. Never saw the result of my page. It's worse than the view.

Do you have an advice for that ? I don't know what to do... Apydatagridbundle might not be appropriate for a lot of data? Change would be hard. We use the mass edit and the integrated export. Specific filters are already developed, too.

Thanks for your help.

Jiizen commented 5 years ago

OK. My groupBy was stupid. I have data. I was blocked for a moment and I found my error just after my message. Very sorry.