Skip to content
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

perf: use count_all_results #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

perf: use count_all_results #137

wants to merge 1 commit into from

Conversation

jannes-io
Copy link

CI has count_all_results. Which allows you to get a count without having to hackishly edit the query. This is more idiomatic querybuilder, more readable, and more performant in my experience (we have a datatable with up to 40K records and this sped things up quite a bit)
https://www.codeigniter.com/user_guide/database/query_builder.html#limiting-or-counting-results

CI has count_all_results. Which allows you to get a count without having to hackishly edit the query. This is more idiomatic querybuilder, more readable, and more performant in my experience (we have a datatable with up to 40K records and this sped things up quite a bit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant