progre55
03/18/2025, 10:07 PMMarvin
03/18/2025, 10:07 PMpsql
or any GUI-based client.
2. Identify Old Runs: Determine the criteria for "old" runs. This could be based on the age of the runs or their state (e.g., completed or failed runs older than a certain date).
3. Delete Runs: Execute SQL commands to delete these runs. You might need to delete entries from multiple tables, such as flow_runs
and task_runs
, ensuring that you maintain referential integrity.
4. Automate if Needed: Consider writing a script or using a database job scheduler to automate this cleanup process regularly.
For more information on managing a self-hosted Prefect server, you can refer to Prefect's self-hosting documentation.
If you have any specific questions about SQL commands or database schema, feel free to ask. Just remember, deleting data directly from the database should be done with caution to avoid unintended consequences.