For the free plan, SQLite has a capacity of 10MB.
Therefore, you need to work on the deletion of unwanted data on a regular basis.
This Val deletes SQLite data that is never used by the Status Val.
This Val is deleting SQLite data. Please understand what this means and remix.
The size of SQLite does not seem to have decreased, The deleted area is not released as free space.
But don't worry, the deleted space is reused.
You can use the VACUUM
command to quickly reduce the size.
However, Val Town does not allow users to VACUUM
command.
Remix this Val. That's it!
This Val assumes that you are using the default cron interval of 15 minutes.
If you have set the cron interval for a long time, the number of rows deleted will increase.
You need to set the value of '-3 days' to a larger number of days.
Enter the following SQL command from SQLite Management and check that there is no output (Default: Every 15 minutes):
select * from uptime where timestamp < datetime('now', '-3 days');