-
-
Notifications
You must be signed in to change notification settings - Fork 3
Performance with 2,000,000 rows #51
Copy link
Copy link
Open
Description
Hello Kevin,
I tried this package for pagination, but I'm encountering few problems.
The problem I'm having here is a performance issue: I have 2,000,000 rows in my table, and the problem I'm encountering is that there's a COUNT() query that's taking a long time to execute. Is there a way around this?
Here's the code used:
$qb = $this->createQueryBuilder('v');
$qb
->orderBy('v.visitedAt', 'DESC')
;
return (new EntityResult($qb))->paginate($page, self::PAGINATOR_PER_PAGE);I would like to point out that in my template I use this if it can help:
paginator.nextPage
paginator|length
Thanks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels