explain.depesz.com

PostgreSQL's explain analyze made readable

Result: u5W5

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 1,372.638 ↑ 20.0 1 1

Nested Loop Left Join (cost=12,791.36..27,916.73 rows=20 width=4) (actual time=1,372.409..1,372.638 rows=1 loops=1)

  • Filter: (lot_bids.* IS NULL)
  • Rows Removed by Filter: 1
2. 0.012 1,372.600 ↑ 1,950.5 2 1

Nested Loop (cost=12,790.94..23,260.66 rows=3,901 width=4) (actual time=1,372.388..1,372.600 rows=2 loops=1)

3. 0.035 0.035 ↑ 1.0 1 1

Seq Scan on tender_lot_states (cost=0.00..1.14 rows=1 width=4) (actual time=0.031..0.035 rows=1 loops=1)

  • Filter: ((tender_lot_state_constant)::text = 'ON_APPROVAL'::text)
  • Rows Removed by Filter: 10
4. 47.616 1,372.553 ↑ 2,682.0 2 1

Index Scan using tender_lot_search_index_lot_state on tender_lots (cost=12,790.94..23,205.88 rows=5,364 width=8) (actual time=1,372.350..1,372.553 rows=2 loops=1)

  • Index Cond: (tender_lot_state_id = tender_lot_states.tender_lot_state_id)
  • Filter: ((tender_lot_is_active IS TRUE) AND (NOT (hashed SubPlan 1)))
  • Rows Removed by Filter: 227
5.          

SubPlan (for Index Scan)

6. 234.099 1,324.937 ↓ 1.3 42,172 1

Merge Join (cost=1.03..12,712.38 rows=31,257 width=5) (actual time=0.069..1,324.937 rows=42,172 loops=1)

  • Merge Cond: (event_core.eventid = event_attributes.eventid)
7. 425.564 926.087 ↓ 1.3 42,206 1

Nested Loop (cost=0.42..6,341.38 rows=32,980 width=4) (actual time=0.043..926.087 rows=42,206 loops=1)

  • Join Filter: (event_core.eventtypelid = event_types.event_type_id)
  • Rows Removed by Join Filter: 122723
8. 170.665 170.665 ↓ 1.0 164,929 1

Index Scan using event_core_pkey on event_core (cost=0.42..3,866.84 rows=164,898 width=8) (actual time=0.010..170.665 rows=164,929 loops=1)

9. 329.834 329.858 ↑ 1.0 1 164,929

Materialize (cost=0.00..1.07 rows=1 width=4) (actual time=0.001..0.002 rows=1 loops=164,929)

10. 0.024 0.024 ↑ 1.0 1 1

Seq Scan on event_types (cost=0.00..1.06 rows=1 width=4) (actual time=0.019..0.024 rows=1 loops=1)

  • Filter: ((event_type_constant)::text = 'EVENT_TYPE_WINNER_NOT_APPROVED'::text)
  • Rows Removed by Filter: 4
11. 164.751 164.751 ↑ 1.0 155,435 1

Index Scan using event_attributes_pkey on event_attributes (cost=0.42..5,586.76 rows=156,285 width=9) (actual time=0.017..164.751 rows=155,435 loops=1)

  • Index Cond: ((attributename)::text = 'lotID'::text)
12. 0.026 0.026 ↓ 0.0 0 2

Index Scan using ix_auctionid_asc on lot_bids (cost=0.42..1.18 rows=1 width=312) (actual time=0.012..0.013 rows=0 loops=2)

  • Index Cond: (tender_lots.tender_lot_id = auctionid)
  • Filter: ((iswinner IS TRUE) AND (isactive IS TRUE))
  • Rows Removed by Filter: 2
Planning time : 1.325 ms
Execution time : 1,372.725 ms