-
-
Notifications
You must be signed in to change notification settings - Fork 859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filtered records count taking a long time #1516
Comments
Afaik, disabling filtered counts is not yet supported. Will try to dig this option when I got the chance. On the other hand, have you tried optimizing your queries using indexes and other db optimization tricks? |
Great thanks! Yeah I've tried to optimise as best I can. We have a table with roughly 50M rows which is well indexed and the select queries are fine, it just seems to be the count that takes ages. |
I agree this might be a huge improvement, looking forward to set filtered count manually. |
Yes, this is a big problem for me as well. |
Yes, I am too need setFilteredCount for big tables. |
For anyone interested, I've circumvented this issue temporarily. I have a branch on my fork that adds a function If you want to include it via a VCS repo in your composer file be sure to make use of an alias so that other package dependencies don't throw versioning errors.
|
@yajra Sure thing. I'll submit the PR tomorrow. |
PR submitted! |
[8.0] Add support for manual setting of filtered count (#1516)
* 8.0: Bump v8.6.0 🚀 Add support for manual setting of filtered count (#1516)
With this PR, Is it possible to completely disable the filtered count? |
I considered adding support for that in this PR but I wasn't sure what that would look like given you need a count otherwise it won't know how many pages to display. |
@forgottencreature You're right. |
Summary of problem or feature request
When calculating the total filtered records in a datatable of ~1M record the count is taking up to 40s whereas the query to display the records is only taking 10ms.
Is there any way to disable the filtered records count?
I know there is a method setTotalRecords() which disables the count of the total number of records but would it be possible to add something similar to prevent the count taking place in the filterRecords() method in DataTableAbstract?
System details
The text was updated successfully, but these errors were encountered: