explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tiad : Optimization for: Optimization for: plan #ereO; plan #lA4

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 427.694 478.766 ↑ 1.0 1 1

Aggregate (cost=49,656.59..49,656.60 rows=1 width=32) (actual time=478.766..478.766 rows=1 loops=1)

2. 4.133 51.072 ↓ 1.0 51,840 1

Append (cost=0.43..47,777.16 rows=50,118 width=402) (actual time=0.015..51.072 rows=51,840 loops=1)

3. 2.773 2.773 ↓ 1.0 2,880 1

Index Scan using pk_pts_vent_2019010110_p12500 on patient_therapy_statistics_vent_2019010110_p12500 (cost=0.43..2,655.53 rows=2,800 width=402) (actual time=0.014..2.773 rows=2,880 loops=1)

  • Index Cond: ((patient_id = 1100) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-06-30 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-06-30 00:00:00'::timestamp without time zone)
4. 2.679 2.679 ↓ 1.0 2,880 1

Index Scan using pk_pts_vent_2019011120_p12500 on patient_therapy_statistics_vent_2019011120_p12500 (cost=0.43..2,653.82 rows=2,798 width=402) (actual time=0.012..2.679 rows=2,880 loops=1)

  • Index Cond: ((patient_id = 1100) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-06-30 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-06-30 00:00:00'::timestamp without time zone)
5. 2.923 2.923 ↓ 1.0 3,168 1

Index Scan using pk_pts_vent_2019012131_p12500 on patient_therapy_statistics_vent_2019012131_p12500 (cost=0.43..2,919.33 rows=3,078 width=402) (actual time=0.013..2.923 rows=3,168 loops=1)

  • Index Cond: ((patient_id = 1100) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-06-30 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-06-30 00:00:00'::timestamp without time zone)
6. 2.631 2.631 ↓ 1.0 2,880 1

Index Scan using pk_pts_vent_2019020110_p12500 on patient_therapy_statistics_vent_2019020110_p12500 (cost=0.43..2,657.38 rows=2,801 width=402) (actual time=0.010..2.631 rows=2,880 loops=1)

  • Index Cond: ((patient_id = 1100) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-06-30 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-06-30 00:00:00'::timestamp without time zone)
7. 2.625 2.625 ↓ 1.0 2,880 1

Index Scan using pk_pts_vent_2019021120_p12500 on patient_therapy_statistics_vent_2019021120_p12500 (cost=0.43..2,655.68 rows=2,799 width=402) (actual time=0.010..2.625 rows=2,880 loops=1)

  • Index Cond: ((patient_id = 1100) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-06-30 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-06-30 00:00:00'::timestamp without time zone)
8. 2.080 2.080 ↓ 1.0 2,304 1

Index Scan using pk_pts_vent_2019022131_p12500 on patient_therapy_statistics_vent_2019022131_p12500 (cost=0.43..2,126.62 rows=2,241 width=402) (actual time=0.011..2.080 rows=2,304 loops=1)

  • Index Cond: ((patient_id = 1100) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-06-30 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-06-30 00:00:00'::timestamp without time zone)
9. 2.585 2.585 ↓ 1.0 2,880 1

Index Scan using pk_pts_vent_2019030110_p12500 on patient_therapy_statistics_vent_2019030110_p12500 (cost=0.43..2,652.06 rows=2,796 width=402) (actual time=0.013..2.585 rows=2,880 loops=1)

  • Index Cond: ((patient_id = 1100) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-06-30 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-06-30 00:00:00'::timestamp without time zone)
10. 2.600 2.600 ↓ 1.0 2,880 1

Index Scan using pk_pts_vent_2019031120_p12500 on patient_therapy_statistics_vent_2019031120_p12500 (cost=0.43..2,652.06 rows=2,796 width=402) (actual time=0.010..2.600 rows=2,880 loops=1)

  • Index Cond: ((patient_id = 1100) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-06-30 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-06-30 00:00:00'::timestamp without time zone)
11. 2.875 2.875 ↓ 1.0 3,168 1

Index Scan using pk_pts_vent_2019032131_p12500 on patient_therapy_statistics_vent_2019032131_p12500 (cost=0.43..2,920.45 rows=3,078 width=402) (actual time=0.013..2.875 rows=3,168 loops=1)

  • Index Cond: ((patient_id = 1100) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-06-30 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-06-30 00:00:00'::timestamp without time zone)
12. 2.622 2.622 ↓ 1.0 2,880 1

Index Scan using pk_pts_vent_2019040110_p12500 on patient_therapy_statistics_vent_2019040110_p12500 (cost=0.43..2,652.84 rows=2,797 width=402) (actual time=0.010..2.622 rows=2,880 loops=1)

  • Index Cond: ((patient_id = 1100) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-06-30 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-06-30 00:00:00'::timestamp without time zone)
13. 2.507 2.507 ↓ 1.0 2,880 1

Index Scan using pk_pts_vent_2019041120_p12500 on patient_therapy_statistics_vent_2019041120_p12500 (cost=0.43..2,652.06 rows=2,796 width=402) (actual time=0.010..2.507 rows=2,880 loops=1)

  • Index Cond: ((patient_id = 1100) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-06-30 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-06-30 00:00:00'::timestamp without time zone)
14. 2.611 2.611 ↓ 1.0 2,880 1

Index Scan using pk_pts_vent_2019042131_p12500 on patient_therapy_statistics_vent_2019042131_p12500 (cost=0.43..2,652.06 rows=2,796 width=402) (actual time=0.014..2.611 rows=2,880 loops=1)

  • Index Cond: ((patient_id = 1100) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-06-30 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-06-30 00:00:00'::timestamp without time zone)
15. 2.578 2.578 ↓ 1.0 2,880 1

Index Scan using pk_pts_vent_2019050110_p12500 on patient_therapy_statistics_vent_2019050110_p12500 (cost=0.43..2,652.06 rows=2,796 width=402) (actual time=0.011..2.578 rows=2,880 loops=1)

  • Index Cond: ((patient_id = 1100) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-06-30 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-06-30 00:00:00'::timestamp without time zone)
16. 2.534 2.534 ↓ 1.0 2,880 1

Index Scan using pk_pts_vent_2019051120_p12500 on patient_therapy_statistics_vent_2019051120_p12500 (cost=0.43..2,652.06 rows=2,796 width=402) (actual time=0.011..2.534 rows=2,880 loops=1)

  • Index Cond: ((patient_id = 1100) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-06-30 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-06-30 00:00:00'::timestamp without time zone)
17. 2.886 2.886 ↓ 1.0 3,168 1

Index Scan using pk_pts_vent_2019052131_p12500 on patient_therapy_statistics_vent_2019052131_p12500 (cost=0.43..2,920.45 rows=3,078 width=402) (actual time=0.014..2.886 rows=3,168 loops=1)

  • Index Cond: ((patient_id = 1100) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-06-30 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-06-30 00:00:00'::timestamp without time zone)
18. 2.550 2.550 ↓ 1.0 2,880 1

Index Scan using pk_pts_vent_2019060110_p12500 on patient_therapy_statistics_vent_2019060110_p12500 (cost=0.43..2,652.06 rows=2,796 width=402) (actual time=0.010..2.550 rows=2,880 loops=1)

  • Index Cond: ((patient_id = 1100) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-06-30 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-06-30 00:00:00'::timestamp without time zone)
19. 2.526 2.526 ↓ 1.0 2,880 1

Index Scan using pk_pts_vent_2019061120_p12500 on patient_therapy_statistics_vent_2019061120_p12500 (cost=0.43..2,656.49 rows=2,801 width=402) (actual time=0.012..2.526 rows=2,880 loops=1)

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

Index Scan using pk_pts_vent_2019062131_p12500 on patient_therapy_statistics_vent_2019062131_p12500 (cost=0.43..2,394.16 rows=2,275 width=402) (actual time=0.010..2.354 rows=2,592 loops=1)

  • Index Cond: ((patient_id = 1100) AND (start_time >= '2019-01-01 00:00:00'::timestamp without time zone) AND (start_time <= '2019-06-30 00:00:00'::timestamp without time zone))
  • Filter: (end_time <= '2019-06-30 00:00:00'::timestamp without time zone)
  • Rows Removed by Filter: 1