We recently encountered an issue on our Magento site a believe we encountered some type of security or SPAM attack on the search feature of our site, which was overpopulating our mage_catalogsearch database with useless data.
Below is the data for the following tables in phpMyAdmin:
phpMyAdmin (database teamss5_mage1)
mage_catalogsearch_query 1,782,506 InnoDB utf8_general_ci 215.5 MiB mage_catalogsearch_result 700,538 InnoDB utf8_general_ci 47.6 MiB
You can see that these rows are storing a considerable amount of data. We are trying to keep our database size down as low as possible to allow for optimal site performance.
When logging into the Magento admin, we are also noticing that when navigating to "Catalog > Search Terms" there are 89,126 pages and a total of 1,782,506 records found. Which seems to be an incredibly unusual large amount of data.
Does anyone have any idea what could have caused this and how we can clean out these pages and records so we can keep our Magento site optimized. Is it possible to truncate or delete these records without affecting our website and causing it to crash? And if so how?
Please let us know what can be done to resolve this issue, any assistance is greatly appreciated!
You can also see the below image link screenshots to better understand the issue: