Jump to content

MySQL slow queries in 1.4.8.2


Recommended Posts

Dear all,

 

   I'm pretty new to Prestashop but an experienced LAMP sysadmin.

 

   I have enabled the slow query log in MySQL. We are running a 1.4.8.2 Prestashop shop. I have searched around in the forums about what to do about slow queries since I have found many tables without indexes that slow down many queries.

 

   Any guide or article that elaborate what to fix?

 

   Thanks,

 

   Miguel

Link to comment
Share on other sites

Well, the truth is that the slow query log is quite big. I have just started reviewing it. For instance a very simple query like this:

 

select * from  ps_search_index WHERE id_product=4042\G
 

running a explain shows that the query has to perform a table scan on ps_search_index. If I add an index on id_product the query uses the index and doesn't need to perform a full table scan

 

Thanks

 

Miguel

Link to comment
Share on other sites

×
×
  • Create New...