From 4cb47eb82e2d6b50defbbf5f0fa08ccd95814e88 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Fri, 11 Sep 2020 22:36:13 +0100 Subject: [PATCH] Update readme --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9fb8845..35b213d 100644 --- a/README.md +++ b/README.md @@ -89,5 +89,18 @@ SELECT shops.title, items.name, shop_items.price, items.item_id, This returns an estimate in MiB of the total storage occupied by the saved JSON data ``` -SELECT SUM(LENGTH(source))/1024/1024 FROM source_store +SELECT ROUND(CAST(SUM(pgsize) AS REAL)/(1024.0*1024.0), 2) FROM dbstat WHERE name='source_store' +``` + +### Deleting JSON logs ### + +You can delete the stored JSON whenever you want. It is adviced that you also set all `source_id` references to 0 in order to avoid wrong references to the new JSON logs getting stored in the future: + +``` +UPDATE items SET source_id=0; +UPDATE fame_list SET source_id=0; +UPDATE icons SET source_id=0; +UPDATE shop_snapshots SET source_id=0; +DROP TABLE IF EXISTS source_store; +VACUUM; ```