diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-05-19 00:53:27 +0100 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-05-19 00:53:27 +0100 |
| commit | cabd894779c2d2e453c8ed7771fdbd17c881bc2c (patch) | |
| tree | 803085077c0a4ad148359738b985e117dff75c42 | |
| parent | b298237a297cb70640c85c016b702a35ecafd9b9 (diff) | |
| download | webstat-cabd894779c2d2e453c8ed7771fdbd17c881bc2c.tar.bz2 webstat-cabd894779c2d2e453c8ed7771fdbd17c881bc2c.tar.xz webstat-cabd894779c2d2e453c8ed7771fdbd17c881bc2c.zip | |
Add index for uninsertable lines with no failure detail
This index would be empty under normal conditions.
| -rw-r--r-- | src/schema.sql | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/schema.sql b/src/schema.sql index e09be28..0d9fcb4 100644 --- a/src/schema.sql +++ b/src/schema.sql @@ -42,6 +42,10 @@ CREATE TABLE entities( CREATE UNIQUE INDEX uni_entities_value ON entities(MD5(value)); +CREATE INDEX idx_entities_retryinsert ON entities(id) +WHERE + type = 'uninsertable_line' AND detail IS NULL; + CREATE OR REPLACE FUNCTION entity(newValue text, newType entity) RETURNS TABLE( id integer, |
