This might be a silly question but i was wondering if it would be a good idea to delete all expired “sessions” from my database, every 15 minutes?
Or just leave it there? Session expires after X minutes, its no longer useful anymore, seems like it just taking up space?
When my team deploys SQL Server session state in a .NET application, we simply create a job with SQL Server Agent to clean up the expired sessions nightly (or at some appropriate interval).
Unless you have massive amounts of traffic, you can do this whenever it is convenient without worrying about instantly deleting unused sessions, but it’s definitely a good idea to clean up.