Now, rather than LIMIT / OFFSET, this uses the highest id from the last batch in each new batch's query. This makes efficient use of the index, and means the database does not have to scan over a large number of non-expired rows before starting to find any expired rows. This also changes the structure of the purge function to continually push ids for deletion onto a channel, to be processed by goroutines consuming that channel. Also, remove the --yes flag and prompting. |
||
|---|---|---|
| .. | ||
| config.json | ||
| main.go | ||
| main_test.go | ||