explain.depesz.com

A tool for finding a real cause for slow queries.

Result: MTL

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 36.876 102.622 ↓ 1.3 22,531 1

Hash Join (cost=49.29..3,467.85 rows=17,526 width=132) (actual time=0.971..102.622 rows=22,531 loops=1)

  • Hash Cond: (pk2012_services.srv_sdf_id_fk = pk2012_service_definitions.sdf_id)
2. 31.724 65.731 ↓ 1.3 22,531 1

Nested Loop (cost=48.20..3,225.77 rows=17,526 width=122) (actual time=0.948..65.731 rows=22,531 loops=1)

3. 0.015 0.015 ↑ 1.0 7 1

Seq Scan on pk2012_periods (cost=0.00..1.07 rows=7 width=35) (actual time=0.003..0.015 rows=7 loops=1)

4. 30.632 33.992 ↓ 1.3 3,219 7

Bitmap Heap Scan on pk2012_services (cost=48.20..423.11 rows=2,504 width=95) (actual time=0.577..4.856 rows=3,219 loops=7)

  • Recheck Cond: ((pk2012_services.srv_state_change_date >= pk2012_periods.per_start_date) AND (pk2012_services.srv_state_change_date <= pk2012_periods.per_end_date))
  • Filter: ((srv_state)::text = 'Z'::text)
5. 3.360 3.360 ↓ 1.3 3,219 7

Bitmap Index Scan on pk2012_srv_state_change_date_idx (cost=0.00..47.58 rows=2,504 width=0) (actual time=0.480..0.480 rows=3,219 loops=7)

  • Index Cond: ((pk2012_services.srv_state_change_date >= pk2012_periods.per_start_date) AND (pk2012_services.srv_state_change_date <= pk2012_periods.per_end_date))
6. 0.007 0.015 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=26) (actual time=0.015..0.015 rows=4 loops=1)

7. 0.008 0.008 ↑ 1.0 4 1

Seq Scan on pk2012_service_definitions (cost=0.00..1.04 rows=4 width=26) (actual time=0.005..0.008 rows=4 loops=1)