explain.depesz.com

PostgreSQL's explain analyze made readable

Result: n5RN : Optimization for: plan #8XWz

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 568.273 578.165 ↑ 1.0 1 1

Aggregate (cost=6,836.92..6,836.98 rows=1 width=320) (actual time=578.164..578.165 rows=1 loops=1)

2. 0.822 9.892 ↓ 1.1 5,472 1

Append (cost=0.56..5,056.78 rows=5,086 width=402) (actual time=0.016..9.892 rows=5,472 loops=1)

3. 6.087 6.087 ↓ 1.0 2,880 1

Index Scan using pk_pts_vent2_2019_jan_01_10 on patient_therapy_statistics_vent_2019_jan_01_10 (cost=0.56..2,660.35 rows=2,808 width=402) (actual time=0.015..6.087 rows=2,880 loops=1)

  • Index Cond: ((patient_id = 4800) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-01-20 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-01-20 00:00:00'::timestamp without time zone)
4. 2.983 2.983 ↓ 1.1 2,592 1

Index Scan using pk_pts_vent2_2019_jan_11_20 on patient_therapy_statistics_vent_2019_jan_11_20 (cost=0.56..2,396.43 rows=2,278 width=402) (actual time=0.014..2.983 rows=2,592 loops=1)

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