Hello all, good morning, can someone push me in th...
# best-practices
s
Hello all, good morning, can someone push me in the right direction. I'm using Prefect on premise running SQLite DB which has a huge size. What is the best way to do some 'housekeeping' in order to reduce the size of this DB longterm? I have already deleted flow_runs via Python script, but it unfortunately was not helpful, the size of the DB remains the same. I assume that prefect server database reset -y will delete also my blocks etc. and this would be a nightmare. Any good hint would be more than welcome, thanks in advance!
d
As far as I know, file size of SQLite database cannot be decreased - it's just SQLite thing. So you can reset database (yes, you'll need to recreate blocks, deployments, etc.) and create flow to clean old or frequent runs and logs in database - just to keep its size from growing. But the best way would be using Postgres database instead of SQLite.
s
Thanks for your reply Dzmitry. Yes I think so as well. I definitely makes sense to switch to PG. Best regards...Sascha