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?.
version |
---|
PostgreSQL 9.6.18 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5), 64-bit |
9 rows affected
user_id | trip_id | start_time | end_time | travelmode |
---|---|---|---|---|
10 | 1000 | 2008-06-18 13:28:18+01 | 2008-06-18 13:32:20+01 | bus |
10 | 1001 | 2008-06-18 14:47:35+01 | 2008-06-18 15:05:31+01 | bus |
10 | 1002 | 2008-08-01 02:51:47+01 | 2008-08-01 03:37:43+01 | metro |
10 | 1003 | 2008-08-01 03:59:36+01 | 2008-08-01 04:30:20+01 | metro |
10 | 1004 | 2008-08-01 05:20:07+01 | 2008-08-01 07:03:51+01 | car |
10 | 1005 | 2008-08-01 07:17:08+01 | 2008-08-01 08:06:26+01 | bus |
10 | 1006 | 2008-09-15 23:54:20+01 | 2008-09-16 00:02:44+01 | bus |
10 | 1007 | 2008-09-16 00:10:22+01 | 2008-09-16 00:28:29+01 | bus |
10 | 1008 | 2008-09-16 00:58:43+01 | 2008-09-16 01:07:14+01 | metro |
11 rows affected
user_id | trip_id | logtime | lat | lon | alt |
---|---|---|---|---|---|
10 | 1002 | 2008-06-18 04:46:20+01 | 39.940474 | 116.346754 | 233 |
10 | 1002 | 2008-06-18 04:46:21+01 | 39.940491 | 116.346745 | 233 |
10 | 1002 | 2008-06-18 04:46:23+01 | 39.940526 | 116.346734 | 233 |
10 | 1002 | 2008-06-18 04:46:25+01 | 39.940573 | 116.346725 | 233 |
10 | 1002 | 2008-06-18 04:46:31+01 | 39.940815 | 116.346688 | 230 |
10 | 1002 | 2008-06-18 04:46:32+01 | 39.940861 | 116.346661 | 230 |
10 | 1002 | 2008-06-18 04:46:33+01 | 39.940941 | 116.346599 | 233 |
10 | 1002 | 2008-06-18 04:46:35+01 | 39.941109 | 116.34658 | 233 |
10 | 1002 | 2008-06-18 04:46:39+01 | 39.941464 | 116.346561 | 240 |
10 | 1002 | 2008-06-18 04:46:40+01 | 39.941558 | 116.346521 | 246 |
10 | 1002 | 2008-06-18 04:46:42+01 | 39.941816 | 116.346438 | 259 |