elabx Posted Wednesday at 12:28 AM Share Posted Wednesday at 12:28 AM I have a site I'm maintaining where I observe this two queries, and the only difference being one field Avg. 0.005s pages.find(parent=1082,template=ad,city_id|cities=11669,ad_status!=1, sort=-created, sort=-verified, limit=21, get_total=count) Avg. 078s pages.find(template=ad, parent=1082, ad_status=1, sort=-verified, sort=-created, city_id=11669, created_users_id!=41, title!=test|Test, status<1024) Average times from ProfilerPro. Event though the second query has more fields, I can confirm that the presence of "city_id|cities" or selector is what's making the query at the top spike. Is there a chance anybody know how to do this OR selection comparable to the second query performance? I've checked my indexes (compared the current ones with a new install of processwire) and they seem to be ok. Maybe this is just a caveat of the OR-field selector?? EDIT: This seems to be at least around twice faster: Avg. 0.035s pages.find(parent=1082,template=ad,(city_id=11669), (cities=11669),ad_status!=1, sort=-created, sort=-verified, limit=21, get_total=count) 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now