add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
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 1000
CREATE TABLE
INSERT 0 100000
CREATE INDEX
CREATE TYPE
user_id log_date payload
991 2014-12-25 673
992 2015-01-01 528
993 2014-12-20 730
994 2014-11-21 404
995 2014-12-25 640
996 2014-12-18 563
997 2014-12-29 154
998 2015-01-02 578
999 2014-12-12 340
1000 2014-12-13 220
SELECT 10
user_id log_date payload
991 2014-12-25 673
992 2015-01-01 528
993 2014-12-20 730
994 2014-11-21 404
995 2014-12-25 640
996 2014-12-18 563
997 2014-12-29 154
998 2015-01-02 578
999 2014-12-12 340
1000 2014-12-13 220
SELECT 10
user_id log_date payload
991 2014-12-25 673
992 2015-01-01 528
993 2014-12-20 730
994 2014-11-21 404
995 2014-12-25 640
996 2014-12-18 563
997 2014-12-29 154
998 2015-01-02 578
999 2014-12-12 340
1000 2014-12-13 220
SELECT 10
user_id log_date payload
991 2014-12-25 673
992 2015-01-01 528
993 2014-12-20 730
994 2014-11-21 404
995 2014-12-25 640
996 2014-12-18 563
997 2014-12-29 154
998 2015-01-02 578
999 2014-12-12 340
1000 2014-12-13 220
SELECT 10