import type { Kysely } from 'kysely'; /** * Indexes for predicates that were running as full table scans. * * Every one of these is a filter that already existed and had nothing to serve it. D1 bills rows * *scanned* rather than rows returned, so an unindexed `delete … where expires_at < ?` on an empty * result set is not free — it is the whole table, every time it runs. * * Three of the four are on the housekeeping sweep, which is the case worth stating plainly: the cron * fires every five minutes forever, so an unindexed predicate there is a scan 288 times a day on a * deployment where nobody has scheduled anything and nobody has signed in. `0011_scheduling` already * made this argument for `publish_at` — "Without the index that is a scan, on a schedule, forever" — * and the other three purges in the same sweep never had it applied to them. * * Indexes cost a row written per insert into these tables. That trade is obviously right here: all * four tables are written rarely relative to how often they are swept, and `login_attempts` — the * one with real write volume — is written once per *failed* sign-in, against being scanned end to * end every five minutes. */ export declare function up(db: Kysely): Promise; export declare function down(db: Kysely): Promise;