explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rwlQ

Settings
# exclusive inclusive rows x rows loops node
1. 2.390 2.438 ↑ 1.0 1 1

Aggregate (cost=1,121.90..1,121.96 rows=1 width=320) (actual time=2.438..2.438 rows=1 loops=1)

2. 0.003 0.048 ↑ 28.0 30 1

Append (cost=0.56..827.85 rows=840 width=402) (actual time=0.013..0.048 rows=30 loops=1)

3. 0.017 0.017 ↑ 27.3 10 1

Index Scan using pk_pts_sleep_1_2019_jan_01_10 on patient_therapy_statistics_sleep_1_2019_jan_01_10 (cost=0.56..260.39 rows=273 width=402) (actual time=0.013..0.017 rows=10 loops=1)

  • Index Cond: ((patient_id = 1908778) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-01-31 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-01-31 00:00:00'::timestamp without time zone)
4. 0.012 0.012 ↑ 27.3 10 1

Index Scan using pk_pts_sleep_1_2019_jan_11_20 on patient_therapy_statistics_sleep_1_2019_jan_11_20 (cost=0.56..260.39 rows=273 width=402) (actual time=0.009..0.012 rows=10 loops=1)

  • Index Cond: ((patient_id = 1908778) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-01-31 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-01-31 00:00:00'::timestamp without time zone)
5. 0.016 0.016 ↑ 29.4 10 1

Index Scan using pk_pts_sleep_1_2019_jan_21_31 on patient_therapy_statistics_sleep_1_2019_jan_21_31 (cost=0.56..307.08 rows=294 width=402) (actual time=0.012..0.016 rows=10 loops=1)

  • Index Cond: ((patient_id = 1908778) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-01-31 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-01-31 00:00:00'::timestamp without time zone)
  • Rows Removed by Filter: 1
Planning time : 1.470 ms