.
This commit is contained in:
@@ -20,7 +20,7 @@ DROP TABLE IF EXISTS snapshots;
|
||||
CREATE TABLE snapshots (
|
||||
id SERIAL PRIMARY KEY,
|
||||
uid TEXT NOT NULL UNIQUE,
|
||||
url TEXT NOT NULL,
|
||||
url TEXT NOT NULL UNIQUE,
|
||||
host TEXT NOT NULL,
|
||||
timestamp TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
mimetype TEXT,
|
||||
@@ -42,7 +42,10 @@ CREATE INDEX idx_lang ON snapshots (lang);
|
||||
CREATE INDEX idx_response_code ON snapshots (response_code);
|
||||
CREATE INDEX idx_error ON snapshots (error);
|
||||
CREATE INDEX idx_host ON snapshots (host);
|
||||
CREATE INDEX unique_uid_url ON snapshots (uid, url);
|
||||
|
||||
CREATE INDEX idx_snapshots_unprocessed_no_data ON snapshots (host)
|
||||
WHERE response_code IS NULL AND error IS NULL
|
||||
INCLUDE (id, uid, url, timestamp, mimetype, gemtext, links, lang);
|
||||
|
||||
CREATE INDEX idx_response_code_error_nulls ON snapshots (response_code, error) WHERE response_code IS NULL AND error IS NULL;
|
||||
|
||||
Reference in New Issue
Block a user