Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sessions Table in database 130Mb


000---000

Recommended Posts

Hi, I think my database is running slower than it should. I have looked through some of the tables and the sessions table has over 250,000 entries in it. Simple question... can a clear this. is Click "empty" in phpmyadmin. Will this speed things up? The sessions table is about 130Mb. I assume clearing this will remove all shopping carts that haven't checked out. Is there anything else I will lose? Thanks. Matt

oscommerce_community_forums.gif
Link to comment
Share on other sites

To avoid killing off live sessions, perhaps you can use an SQL query to delete only old rows. In the sessions table there is an "expiry" field which I think is a timestamp. Pick a timestamp more than a day or two old and delete every row with an older "expiry". You can use http://www.4webhelp.net/us/timestamp.php to get the number for "expiry". And of course, back up your database first (at least, until you've done this once or twice and know if and how it works)!

 

Does anyone have an idea why this table would build up an accumulation of old sessions? Isn't it supposed to clean itself out?

Link to comment
Share on other sites

  • 8 months later...

...

 

Does anyone have an idea why this table would build up an accumulation of old sessions? Isn't it supposed to clean itself out?

 

Good question MrPhil. Anybody knows the answer? Can I set somehow, that every session older than e.g. one week is automatically deleted? I would appreciate it.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...