Jump to content

table ps_connections_page and ps_connections, can i empty them?


Recommended Posts

  • 5 months later...
  • 2 months later...
  • 6 months later...

I also have the same question. These two tables are taking up 20+ MB, and causing my DB backup to fail (I'm using a shared hosting plan).
Is it safe to delete the content from these tables? What are the consequences?

Link to comment
Share on other sites

Yes, you can empty those tables. The only thing you'll lose is the customer's "last visited" date. You can also go to Stats > Settings and automatically clean out these tables on a weekly, monthly or yearly basis.

  • Like 1
Link to comment
Share on other sites

The page_viewed table stores which pages were viewed by which customers and what time. I suppose you could empty that table too if you aren't interested in that information.

The search_index table is used for the search autocomplete. If you aren't using that feature, I suppose you could clear it as well, though I'm not sure whether it is used for regular search. Make a backup first just in case. You can change the settings and regenerate the search index on the Preferences > Search tab.

Link to comment
Share on other sites

  • 6 months later...
  • 4 months later...
  • 3 weeks later...
  • 3 weeks later...

Thanks, I just emptied the three ps_connection related tables.

They were taking up nearly 100MB of disk space!

All pages are loading much faster and I hope this is because of the reduction in the database size, and not just a coincidence.

Link to comment
Share on other sites

  • 6 months later...
  • 1 year later...
  • 3 weeks later...
  • 4 months later...

For me (clean 1.5.4.1) the auto clean doesn't work...

 

What to check? My ps_connections and ps_guest tables are ~40k rows and I think they slow my site down, I would like to keep 1 week stats but no good... :|

Same here. Cleaning Rate set to weekly in the back office but nonetheless the two tables here were some 50mb in size. Just emptied them manually but wonder, too, why they are not cleaned automatically as defined in the BO?
Link to comment
Share on other sites

  • 4 months later...
  • 2 months later...
  • 4 months later...
  • 6 months later...

I use this sql query to clean my database

 

 

TRUNCATE TABLE `ps_connections`;

cleardot.gif

TRUNCATE TABLE `ps_connections_page`;

TRUNCATE TABLE `ps_connections_source`;

TRUNCATE TABLE `ps_page_viewed`;

TRUNCATE TABLE `ps_guest`;

 

 

backup the database before you do this query!!

 

Matteo

  • Like 1
Link to comment
Share on other sites

  • 7 months later...

Every time a connection is made to your site, the cleaner deletes all connections older than 1 week, 1 month or 1 year.

So this means that it only empties the individuals info if they return, and if they allow the cookie too?

It definitely doesn't delete everything on any routine pattern because I have to manually do this when things start to slow down.

There really needs to be a setting somewhere in the back office when to clean up the tables automatically, with us able to select once a day, week or month etc.

Link to comment
Share on other sites

  • 3 weeks later...

but how disable writing in these tables?

If i not use statistics, is not performing all this writing.

 

you would need to search your entire native PrestaShop to determine 1) how to disable and 2) 'all' areas of native that are using this information and action them as well.

 

or you can empty them manually, create a mysql trigger to do it, use a  module solution....

Edited by El Patron (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...