Magento 2.

  • What is the role of the search_query table?
  • Where is it used?
  • Should I ever clear it?
  • What would be the impact of clearing it?

This table contains the previous search terms of previous customers.
it is also used to display search suggestions for new customers based on what the old customers searched.
If you clear it, the only effect would be that the customers will not see search suggestions until the table is populated again.
If you are using a custom search solutions you can just truncate it.


search_query table stores search terms which is searched by user or customer in frontend.

It shows in admin dashboard so that admin also understands which search terms user tried more and which one are popular. Also it helps next or future customers to search based on previous search

If you truncate it then future customers will not get search suggestions. Also admin cannot see the records in admin dashboard the popular search terms.


Disable it, why would you want user search texts to show up in your store, they can write anything in there T_T....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.