{"action":"created","issue":{"url":"https://api.github.com/repos/EverythingMe/redash/issues/452","labels_url":"https://api.github.com/repos/EverythingMe/redash/issues/452/labels{/name}","comments_url":"https://api.github.com/repos/EverythingMe/redash/issues/452/comments","events_url":"https://api.github.com/repos/EverythingMe/redash/issues/452/events","html_url":"https://github.com/EverythingMe/redash/issues/452","id":87568951,"number":452,"title":"A question about database","user":{"login":"tonychee7000","id":2174238,"avatar_url":"https://avatars.githubusercontent.com/u/2174238?v=3","gravatar_id":"","url":"https://api.github.com/users/tonychee7000","html_url":"https://github.com/tonychee7000","followers_url":"https://api.github.com/users/tonychee7000/followers","following_url":"https://api.github.com/users/tonychee7000/following{/other_user}","gists_url":"https://api.github.com/users/tonychee7000/gists{/gist_id}","starred_url":"https://api.github.com/users/tonychee7000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonychee7000/subscriptions","organizations_url":"https://api.github.com/users/tonychee7000/orgs","repos_url":"https://api.github.com/users/tonychee7000/repos","events_url":"https://api.github.com/users/tonychee7000/events{/privacy}","received_events_url":"https://api.github.com/users/tonychee7000/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-12T01:41:04Z","updated_at":"2015-06-13T07:30:38Z","closed_at":"2015-06-12T07:52:04Z","body":"Hello,\r\n\r\nI have a problem that when i use redash, table 'query_results' have taken too many disk space since 3 month ago, it's up to 17GB.\r\n\r\nI've tried to delete some old data to release disk space, but failed with error about foreign keys.\r\n\r\nSo how can i clean the old data from database?"},"comment":{"url":"https://api.github.com/repos/EverythingMe/redash/issues/comments/111684389","html_url":"https://github.com/EverythingMe/redash/issues/452#issuecomment-111684389","issue_url":"https://api.github.com/repos/EverythingMe/redash/issues/452","id":111684389,"user":{"login":"arikfr","id":71468,"avatar_url":"https://avatars.githubusercontent.com/u/71468?v=3","gravatar_id":"","url":"https://api.github.com/users/arikfr","html_url":"https://github.com/arikfr","followers_url":"https://api.github.com/users/arikfr/followers","following_url":"https://api.github.com/users/arikfr/following{/other_user}","gists_url":"https://api.github.com/users/arikfr/gists{/gist_id}","starred_url":"https://api.github.com/users/arikfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arikfr/subscriptions","organizations_url":"https://api.github.com/users/arikfr/orgs","repos_url":"https://api.github.com/users/arikfr/repos","events_url":"https://api.github.com/users/arikfr/events{/privacy}","received_events_url":"https://api.github.com/users/arikfr/received_events","type":"User","site_admin":false},"created_at":"2015-06-13T07:30:38Z","updated_at":"2015-06-13T07:30:38Z","body":"@tonychee7000 to enable the built in cleanup, just add `REDASH_QUERY_RESULTS_CLEANUP_ENABLED=true` to your `.env` file (I'm assuming you've used one of the provided images to setup re:dash -- let me know if you need more elaborate instructions).\r\n\r\nIt deletes 100 query results on every iteration, so it might take some time to finish. "}}