You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2022. It is now read-only.
Maybe we should archive old/expired numbers, so performance of primary numbers table is kept high?
Additionally I don't know about reusage of numbers, so having it already stored with old timestamp might prevent it from being entered (in bad circumstances; unlikely, but possible).
One suggestion could be a regular cron job (maybe put into a shell skript):
sqlite3 --batch --cmd "BEGIN TRANSACTION;" lagesonr.db <<EOMCREATETABLEIF NOT EXISTS numbers_old(timeTIMESTAMPNOT NULL, numbers VARCHAR(30) NOT NULL, user VARCHAR(10) NOT NULL, place VARCHAR(20) NOT NULL, fingerprint VARCHAR(32) NOT NULL);
CREATEINDEXIF NOT EXISTS i_old_num ON numbers(number, fingerprint);
INSERT INTO numbers_old SELECT*FROM numbers WHEREtime<date('now', '-30 days');
DELETEFROM numbers WHEREtime<date('now', '-30 days');
COMMIT TRANSACTION;
EOM
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Maybe we should archive old/expired numbers, so performance of primary numbers table is kept high?
Additionally I don't know about reusage of numbers, so having it already stored with old timestamp might prevent it from being entered (in bad circumstances; unlikely, but possible).
One suggestion could be a regular cron job (maybe put into a shell skript):
The text was updated successfully, but these errors were encountered: