Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › What are the best settings to have the lowest overhead. › Reply To: What are the best settings to have the lowest overhead.
Thank you for your kind words, I really appreciate them.
You wrore at the perfect moment, I was struggling to find a good tool to record/live feed all database queries on my test environment, as my current solution feels a bit of an issue to maintain correctly. Currently I’m using the phpMyAdmin statistics with full query log, which is not bad, as it allows selecting specific timeframes to analyze. As well as WordPress records all queries if enabled, so I tried a few plugins as well. If you have any good suggestions, please feel free to share it with me.
I did not know that about the “SHOW TABLES” query. I thought it delegates to the information schema table, and just queries the corresponding row there, but apparently not, my google searches confirm that. I spent so much time optimizing the search queries, I completely forgot about these. I think I can simply resolve this by your method, or just query the table contents without this check, the WordPress database wrapper should return an error in case of issues. This will be sorted within the next release for sure.
The [no-keyword] (empty phrase) record indicates searches where the keyword was not present:
– ..in cases where the user types in something, the deletes it. If the character count to trigger the search is set to 0 (by default it is 0), then the search triggers, and notes this as an empty phrase search. If you change the minimum character count to at least 1, this will go away. Depending on the language, I can suggest even 2-3 or more characters. It will reduce the server overhead even more.
– ..or when the phrase is not escapable and poses an SQL injection threat. Bots can do this, but there is a very slim chance.
– ..and sometimes it is due to a bug, that was recently discovered. A few versions back the statistics were changed, so it is separated from the search process. The search phrase is parsed again from the input then sent for statistics, after the search is done. Sometimes the users already delete the phrase or navigate to a result, so from time to time it gets an empty value.
Given your graph, it is most likely case 1 and sometimes case 3 combined.
For even more optimization, you can off the search statistics alltogether. It faces a massive rework soon, as it is dated and needs a lot of improvement. As an alternative, I suggest using the google analytics integration option which also allows site search tracking. It has one downside, that the search queries are recorded as page views – but at least it does not use any server resources on your end.
Thank you for all your information, and I hope this helps.Best,
If you like my products, don't forget to rate them on codecanyon :)