explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IsHI

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 1.889 39.886 ↓ 4.7 7,605 1

Nested Loop (cost=8,824.75..10,375.53 rows=1,626 width=121) (actual time=37.157..39.886 rows=7,605 loops=1)

2.          

CTE maxdate

3. 0.008 36.624 ↑ 1.0 1 1

Finalize Aggregate (cost=8,799.95..8,799.96 rows=1 width=4) (actual time=36.624..36.624 rows=1 loops=1)

4. 6.847 36.616 ↓ 1.5 3 1

Gather (cost=8,799.74..8,799.95 rows=2 width=4) (actual time=36.562..36.616 rows=3 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 7.779 29.769 ↑ 1.0 1 3

Partial Aggregate (cost=7,799.74..7,799.75 rows=1 width=4) (actual time=29.769..29.769 rows=1 loops=3)

6. 21.990 21.990 ↑ 1.3 106,735 3

Parallel Seq Scan on polyclinic_availability_of_appointment_mat_master polyclinic_availability_of_appointment_mat_master_1 (cost=0.00..7,466.19 rows=133,419 width=4) (actual time=0.023..21.990 rows=106,735 loops=3)

7. 36.630 36.630 ↑ 1.0 1 1

CTE Scan on maxdate (cost=0.00..0.02 rows=1 width=4) (actual time=36.629..36.630 rows=1 loops=1)

8. 0.901 1.367 ↓ 4.7 7,605 1

Bitmap Heap Scan on polyclinic_availability_of_appointment_mat_master (cost=24.79..1,559.29 rows=1,626 width=117) (actual time=0.512..1.367 rows=7,605 loops=1)

  • Recheck Cond: ((rank_id = 1) AND (date = maxdate.dd))
  • Heap Blocks: exact=198
9. 0.466 0.466 ↓ 4.7 7,605 1

Bitmap Index Scan on polyclinic_availability_of_appointme_rank_id_date_filial_id_idx (cost=0.00..24.38 rows=1,626 width=0) (actual time=0.466..0.466 rows=7,605 loops=1)

  • Index Cond: ((rank_id = 1) AND (date = maxdate.dd))