Cscart session

Hi Cs-carters,



My table cscart_sessions has grown too huge and probably is hurting the performance.



I see the sessions as old as one year.



Is there a safe way to clear the sessions older than certain period and for unregistered users ?



regds,

Shikhar

For anyone facing the same issue. You can run the following sqls (use you own suitable timestamp value for expiry) :


<br />
delete from cscart_sessions where expiry <= 1378038432<br />

```<br />
[s]delete from cscart_user_session_products where session_id not in (select session_id from cscart_sessions)[/s]<br />
<br />
Executing second statement will delete items from wishlist and abandoned carts, don't do that.  I pissed off a lot of customers <img src="upload://n4syhXZrRhsStKvmS4jT3Mp2S3k.png" class="bbc_emoticon" alt=":(">

should be done automatically based on your SESSION_ALIVE_TIME (think that's the name) define.

Ive experienced such problem.
My site is under development (so no customers see it) and I noticed great database size (about 200 Mb) 170 Mb was sessions table. Unfortunatly I don
t remember row count. I truncated it.

But 2 days later I saw that this table has 30 Mb with 6 rows (!!!). After defragmentation it size reduced to 30 kb.



Is this some cs-cart bug or db problem?