Details
-
Bug
-
Resolution: Fixed
-
Medium
-
3.6.10, 3.6.11, 3.6.9, 3.7.7, 3.7.8, 3.7.9, 3.8.2, 3.8.3, 3.8.4, 3.8.6, 3.9.0alpha1, 3.9.0rc1
-
None
-
Operating System: Linux
PHP Version: 4.4
Database and version:
Description
If you add this index:
alter table ezsearch_return_count add key ( phrase_id, count );
search stats will speed up significantly.
For example the search stats based on the ez.no database (more than 2 million queries) will speed up to around 55 seconds instead of crashing after maximum execution time (300 seconds) (both values on my local machine).
Denormalisation of the database (saving the search count and perhaps added result count) should be even much faster. A patch shouldn't be that much:
- database schema alteration of ezsearch_search_phrase
- some small changes of sql statements in classes/ezsearchlog.php
- update script for search stat tables
- ezsearch_return_count and related code could be deleted as the additional time information is not used (of course the table and functionality can be kept for BC)
If such a patch would go into 3.9/trunc, I would provide it till tomorrow.
Have a nice day
Thomas