Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up old RT sessions #19

Open
fydai opened this issue Nov 2, 2019 · 1 comment
Open

Clean up old RT sessions #19

fydai opened this issue Nov 2, 2019 · 1 comment

Comments

@fydai
Copy link

fydai commented Nov 2, 2019

Migrated from https://ocf.io/rt/7334

@ja5087
Copy link
Member

ja5087 commented Jul 20, 2020

I arrived here after discovering that the RT sessions table was 8GB and maelstrom was running out of space. jvperrin already listed the deets on how to do this but from my experience the script is stupid slow (probably because it does a full table scan and is likely deleting them one by one) and we should just:

  1. add an index on lastupdated
  2. write our own sql to clean this up ( lastUpdated < time )

in case this still isn't done when I'm old and we still use RT, if the table grows too big just do this:

delete from sessions;
optimize table sessions;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants