Forums › Forums › Search & Filter Pro › Filtering by 'meta' vs 'taxonomy' – any difference in query speed/performance?
Tagged: best practices, performance, query speed
- This topic has 4 replies, 2 voices, and was last updated 6 years, 4 months ago by
Anonymous.
-
Trevor(Private) March 13, 2019 at 1:23 pm #205000
Hi Oran
Taxonomy is faster, but won’t do numerical things like date ranges, range slider, sorting, etc.
This is because taxonomies are stored by their ID, so the SQL queries are always numeric comparisons, whereas post meta is often a string comparison which are generally slower. So post meta where numerical data should be used where you need to compare ranges like ranges (numbers or dates) or sorting, or taxonomy when the user wants a multiple “choice” scenario.
Anonymous(Private) March 13, 2019 at 2:09 pm #205012Thanks Trevor! And that applies to the queries that S&F runs as opposed to just regular WordPress taxonomy queries?
I’m not really a dev so don’t understand the finer details of it all, but does the fact that S&F is just querying it’s cache in the database rather than running ‘live’ search each time make any difference?
And I know it’s difficult to say as it depends on the server and number of visitors – but in real world terms, does it actually make a difference in the end? Will an S&F taxonomy query be noticeably faster for the end user than an S&F meta query do you think?
Thanks for bearing with me 🙂
-
AuthorPosts