I just started using yii\web\DbSession
for session storage, my current table has 33,000 rows in it.
Do I need all these records? Am I using them? Should I be setting up some sort of implementation that deletes all old records?
I just started using yii\web\DbSession
for session storage, my current table has 33,000 rows in it.
Do I need all these records? Am I using them? Should I be setting up some sort of implementation that deletes all old records?
It seems, you have a big project, so you have many user sessions. Having big table full of sessions itself is not a problem. Yii DbSession component has a garbage collector method gcSession() that is called on each session save and Yii takes care about expired records in sessions table automatically.
So yes, you need all of them.
If is slows your application, you might need to tune your DBMS. There is a good answer with useful links: MySQL optimization of huge table