By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
CREATE TABLE
INSERT 0 14
county | candidate | votes |
---|---|---|
Abbeville | Hillary Clinton | 1501 |
Abbot | Bernie Sanders | 1 |
Abington | Kermit the frog | 1352 |
Abington | Bernie Sanders | 1352 |
SELECT 4
ANALYZE
VACUUM
county | county | candidate | votes |
---|---|---|---|
Abbeville | Abbeville | Hillary Clinton | 1501 |
Abbot | Abbot | Bernie Sanders | 1 |
Abington | Abington | Kermit the frog | 1352 |
SELECT 3
county | candidate | votes |
---|---|---|
Abbeville | Hillary Clinton | 1501 |
Abbot | Bernie Sanders | 1 |
Abington | Kermit the frog | 1352 |
SELECT 3
DROP TABLE
ERROR: relation "primary_results_csv" does not exist LINE 1: SELECT * FROM primary_results_csv; ^
CREATE TABLE
ALTER TABLE
CREATE INDEX
INSERT 0 14
county | candidate | votes |
---|---|---|
Abbeville | Hillary Clinton | 1501 |
Abbot | Bernie Sanders | 1 |
Abington | Bernie Sanders | 1352 |
SELECT 3