explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oUCd

Settings
# exclusive inclusive rows x rows loops node
1. 30.760 33.735 ↑ 1.0 1 1

Aggregate (cost=2,813.87..2,813.89 rows=1 width=32) (actual time=33.735..33.735 rows=1 loops=1)

  • Output: round((sum(((((patient_therapy_statistics_vent_2019_jan_01_10.channel_stats -> 'tidVolExhaled'::text) ->> 'avgValue'::text))::numeric * (((patient_therapy_statistics_vent_2019_jan_01_10.channel_stats -> 'tidVolExhaled'::text) ->> 'total_duration'::text))::numeric)) / sum((((patient_therapy_statistics_vent_2019_jan_01_10.channel_stats -> 'tidVolExhaled'::text) ->> 'total_duration'::text))::numeric)), 2)
  • Buffers: shared hit=2906
2. 0.244 2.975 ↓ 1.0 2,880 1

Append (cost=0.56..2,708.12 rows=2,820 width=522) (actual time=0.017..2.975 rows=2,880 loops=1)

  • Buffers: shared hit=2906
3. 2.726 2.726 ↓ 1.0 2,880 1

Index Scan using pk_pts_vent2_2019_jan_01_10 on ptd.patient_therapy_statistics_vent_2019_jan_01_10 (cost=0.56..2,699.77 rows=2,818 width=522) (actual time=0.017..2.726 rows=2,880 loops=1)

  • Output: patient_therapy_statistics_vent_2019_jan_01_10.channel_stats
  • Index Cond: ((patient_therapy_statistics_vent_2019_jan_01_10.patient_id = 1) AND (patient_therapy_statistics_vent_2019_jan_01_10.start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (patient_therapy_statistics_vent_2019_jan_01_10.start_time <= '2019-01-31 00:00:00'::timestamp without time zone))
  • Filter: (patient_therapy_statistics_vent_2019_jan_01_10.end_time <= '2019-01-31 00:00:00'::timestamp without time zone)
  • Buffers: shared hit=2904
4. 0.003 0.003 ↓ 0.0 0 1

Index Scan using pk_pts_vent2_2019_jan_11_20 on ptd.patient_therapy_statistics_vent_2019_jan_11_20 (cost=0.15..4.18 rows=1 width=32) (actual time=0.003..0.003 rows=0 loops=1)

  • Output: patient_therapy_statistics_vent_2019_jan_11_20.channel_stats
  • Index Cond: ((patient_therapy_statistics_vent_2019_jan_11_20.patient_id = 1) AND (patient_therapy_statistics_vent_2019_jan_11_20.start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (patient_therapy_statistics_vent_2019_jan_11_20.start_time <= '2019-01-31 00:00:00'::timestamp without time zone))
  • Filter: (patient_therapy_statistics_vent_2019_jan_11_20.end_time <= '2019-01-31 00:00:00'::timestamp without time zone)
  • Buffers: shared hit=1
5. 0.002 0.002 ↓ 0.0 0 1

Index Scan using pk_pts_vent2_2019_jan_21_31 on ptd.patient_therapy_statistics_vent_2019_jan_21_31 (cost=0.15..4.18 rows=1 width=32) (actual time=0.002..0.002 rows=0 loops=1)

  • Output: patient_therapy_statistics_vent_2019_jan_21_31.channel_stats
  • Index Cond: ((patient_therapy_statistics_vent_2019_jan_21_31.patient_id = 1) AND (patient_therapy_statistics_vent_2019_jan_21_31.start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (patient_therapy_statistics_vent_2019_jan_21_31.start_time <= '2019-01-31 00:00:00'::timestamp without time zone))
  • Filter: (patient_therapy_statistics_vent_2019_jan_21_31.end_time <= '2019-01-31 00:00:00'::timestamp without time zone)
  • Buffers: shared hit=1
Planning time : 1.125 ms