Whenever I search based on a date range, it takes 30 seconds or more to display the results.
For a comparison a search without a date range would take 2-3 seconds max.
Another problem is that, once it has displayed the results from the date search and say, you want to go to the second page. It takes another 30 seconds or more to show the results on the second page.
@notesow would you be able to share if you managed to fix your problem?
I believe it is the same issue.
@ihor@andrii would you be able to share how the date based search works?
And if you have an idea about how to change it or improve it to reduce the loading time to a minimum.
This search also depends on the server response time. The server response time depends on many factors, e.g., your hosting plan (we recommend the VPS), other installed plugins (each plugin may slow down the site), customizations, the number of users and listings, caching (try setting up Litespeed), etc. - if you’re familiar with website setup, I recommend going through all the possible issues.
Also, I recommend looking at the wp_post table, how many entries you have there, etc.
thank you Andrii, I will definitely explore all the possibilities.
In the below comment from Ihor he is mentioning that you were planning to optimise it by auto-generating lookup tables, has this been implemented?
If not, would you be able to share the code of how it is currently done?
“if you search by both location and dates the query is pretty complex since it performs a radius-based search (by latitude/longitude) and date availability search (by comparing date ranges). We plan to optimize it in future updates by auto-generating lookup tables instead of querying the wp_posts one.”
Unfortunately there’s no such feature yet but we plan to implement it. This required advanced customizations, to create and sync the lookup tables on every listing update.
understood, would you please share with me where I can find the source code for the wp_post query?
I would like to try and disable it and then make the customisation myself.