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; ```