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

Improve efficiency of filter query in Postgres #2401

Merged

Conversation

dwbutler
Copy link
Contributor

In Postgres, filter queries currently generate a condition LOWER(field) ILIKE ?. This defeats the benefit of using ILIKE, which is case insensitive, and also prevents an index from being used. This fixes the issue by changing the condition to field ILIKE ? in Postgres.

In Postgres, filter queries currently generate a condition `LOWER(field) ILIKE ?`. This defeats the benefit of using ILIKE, which is case insensitive, and also prevents an index from being used. This fixes the issue by changing the condition to `field ILIKE ?` in Postgres.
mshibuya added a commit that referenced this pull request Sep 15, 2015
Improve efficiency of filter query in Postgres
@mshibuya mshibuya merged commit 35c3d64 into railsadminteam:master Sep 15, 2015
@mshibuya
Copy link
Member

Thanks!

@dwbutler
Copy link
Contributor Author

Thanks for the quick response!

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.

2 participants