explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qYAL : Optimization for: Optimization for: plan #IsHI; plan #Wx4y

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 1.275 1.805 ↓ 4.7 7,605 1

Bitmap Heap Scan on polyclinic_availability_of_appointment_mat_master (cost=25.31..1,559.81 rows=1,626 width=117) (actual time=0.513..1.805 rows=7,605 loops=1)

  • Recheck Cond: ((rank_id = 1) AND (date = $1))
  • Heap Blocks: exact=198
2.          

Initplan (forBitmap Heap Scan)

3. 0.003 0.045 ↑ 1.0 1 1

Result (cost=0.51..0.52 rows=1 width=4) (actual time=0.045..0.045 rows=1 loops=1)

4.          

Initplan (forResult)

5. 0.001 0.042 ↑ 1.0 1 1

Limit (cost=0.42..0.51 rows=1 width=4) (actual time=0.042..0.042 rows=1 loops=1)

6. 0.041 0.041 ↑ 108,955.0 1 1

Index Only Scan Backward using polyclinic_availability_of_appointme_rank_id_date_filial_id_idx on polyclinic_availability_of_appointment_mat_master polyclinic_availability_of_appointment_mat_master_1 (cost=0.42..9,331.83 rows=108,955 width=4) (actual time=0.041..0.041 rows=1 loops=1)

  • Index Cond: ((rank_id = 1) AND (date IS NOT NULL))
  • Heap Fetches: 1
7. 0.485 0.485 ↓ 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.485..0.485 rows=7,605 loops=1)

  • Index Cond: ((rank_id = 1) AND (date = $1))