Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Optimize SQL table tx_solr_statistics for frequent search terms by adding an index #4149

Open
mmoeller129 opened this issue Sep 10, 2024 · 0 comments

Comments

@mmoeller129
Copy link

Is your feature request related to a problem? Please describe.
Frequent search terms statistics sql is slow when table grows big.

Describe the solution you'd like
Add an index to the table like this:
CREATE INDEX idx_frequentsearches ON tx_solr_statistics (root_pid, language, num_found, keywords);

Describe alternatives you've considered
Normalize or using hashes manually - but they are probably too complex

Additional context
I had this issue in frontend when clearing "all caches" unusually slowed the page down. I am not sure why because i could only trace the call back from getFrequentSearchTermsFromStatisticsByFrequentSearchConfiguration in the StatisticsRepository to the FrequentlySearchedViewHelper...
With the index the time for the query execution went down from 93,663ms to 575ms with approx. 482 503 entries in tx_solr_statistics (according to xdebug output in admPanel)

Target versions
12.0.5 - probably previous versions also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant