18 lines
620 B
SQL
18 lines
620 B
SQL
CREATE INDEX IF NOT EXISTS proxy_logs_created_at_desc_idx
|
|
ON proxy_logs (created_at DESC, id DESC);
|
|
|
|
CREATE INDEX IF NOT EXISTS route_channels_route_enabled_cooldown_idx
|
|
ON route_channels (route_id, enabled, cooldown_until, account_id, token_id);
|
|
|
|
CREATE INDEX IF NOT EXISTS token_routes_enabled_id_idx
|
|
ON token_routes (enabled, id);
|
|
|
|
CREATE INDEX IF NOT EXISTS accounts_id_status_site_idx
|
|
ON accounts (id, status, site_id);
|
|
|
|
CREATE INDEX IF NOT EXISTS sites_id_status_url_idx
|
|
ON sites (id, status, url);
|
|
|
|
CREATE INDEX IF NOT EXISTS account_tokens_id_enabled_idx
|
|
ON account_tokens (id, enabled);
|