Jump to content

how to prevent this again?


Recommended Posts

Mysql Killed Queries Logs

 


Query


 


d:Query time:20 query:INSERT INTO `ps_guest` (`id_operating_system`, `id_web_browser`, `id_customer`, `javascript`, `screen_resolution_x`, `screen_resolution_y`, `screen_color`, `sun_java`, `adobe_flash`, `adobe_director`, `apple_quicktime`, `real_player`, `windows_media`, `accept_language`, `mobile_theme`) VALUES ('0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '', '0')


 


This was shown in MySQL logs. What caused this ?


Link to comment
Share on other sites

This is not a query, it is execute statement that inserts data into your database.

 

this statement would typically be inserted when a person visits your website.  it tracks things like their browser, desktop resolution, language etc..  Prestashop does this so you could view this type of statistics in your back office.  My first suggestion would be to disable statistics and use google analytics instead.

 

If this insert statement is taking 20 seconds to execute, then you really should be speaking to your host about issues with their MYSQL server.  this type of insert statement should take milliseconds to execute in a healthy environment.

Link to comment
Share on other sites

As I told you you it is a statistic table which is executed every time when somebody (quest" is visiting your page. If you have a restricted webspace, in execution and space, you should disable all statistic modules. In this case nothing is executed and also not written to make a table large. You can track your users by google analytics than. It is not necessary to track them with Prestashop statistics too....

 

Google analytics is tracked by google, so data are not stored in your database.

Link to comment
Share on other sites

Hi,

To add google analytics code inside header or footer tpl file coding experience not required.

Simply get the google code ,in header or footer file add code with {literal}.google code {/literal} smarty tags.

I had added google analytics code in footer.tpl file in prestashop websites.
 

PrestaShop Tutorials Videos [How to do Tasks]

https://www.prestashop.com/forums/topic/907438-prestashop-tutorials-videos-how-to-do-tasks/

Edited by Zohaib-fk (see edit history)
Link to comment
Share on other sites

Hi,

 

To add google analytics code inside header or footer tpl file coding experience not required.

 

Simply get the google code ,in header or footer file add code with {literal}.google code {/literal} smarty tags.

 

I had added google analytics code in footer.tpl file in prestashop websites.

Please open a own new topic on SEO general forum. The thread here is about problems in database

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...