explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1l3E

Settings
# exclusive inclusive rows x rows loops node
1. 0.203 985.932 ↑ 1.0 1 1

Aggregate (cost=3,033.84..3,033.85 rows=1 width=4) (actual time=985.931..985.932 rows=1 loops=1)

  • Buffers: shared hit=16055 read=16
2. 346.404 985.729 ↓ 483.0 483 1

Nested Loop Left Join (cost=1,969.51..3,033.82 rows=1 width=3,280) (actual time=125.989..985.729 rows=483 loops=1)

  • Join Filter: (l."Id" = ps.event_id)
  • Rows Removed by Join Filter: 663091
  • Buffers: shared hit=16055 read=16
3.          

CTE price_suggest

4. 13.108 13.762 ↑ 1.0 1,373 1

HashAggregate (cost=100.78..114.51 rows=1,373 width=16) (actual time=13.350..13.762 rows=1,373 loops=1)

  • Group Key: activity_listing."EventSSId
  • Buffers: shared hit=76
5. 0.654 0.654 ↓ 1.0 1,659 1

Seq Scan on activity_listing (cost=0.00..92.52 rows=1,652 width=16) (actual time=0.004..0.654 rows=1,659 loops=1)

  • Buffers: shared hit=76
6. 0.301 222.979 ↓ 483.0 483 1

Nested Loop Left Join (cost=1,855.00..2,874.69 rows=1 width=8) (actual time=112.163..222.979 rows=483 loops=1)

  • Buffers: shared hit=15979 read=16
7. 0.721 163.752 ↓ 483.0 483 1

Nested Loop (cost=1,854.72..2,859.62 rows=1 width=8) (actual time=112.131..163.752 rows=483 loops=1)

  • Buffers: shared hit=12610 read=4
8. 25.632 162.065 ↓ 483.0 483 1

Hash Join (cost=1,854.44..2,851.31 rows=1 width=12) (actual time=112.096..162.065 rows=483 loops=1)

  • Hash Cond: (c.city_id = v.venue_city)
  • Buffers: shared hit=11643 read=4
9. 24.474 24.474 ↑ 1.0 36,863 1

Seq Scan on mv_city_state_country c (cost=0.00..858.63 rows=36,863 width=4) (actual time=0.005..24.474 rows=36,863 loops=1)

  • Buffers: shared hit=490
10. 0.243 111.959 ↓ 483.0 483 1

Hash (cost=1,854.43..1,854.43 rows=1 width=16) (actual time=111.959..111.959 rows=483 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 31kB
  • Buffers: shared hit=11153 read=4
11. 0.659 111.716 ↓ 483.0 483 1

Nested Loop (cost=1.12..1,854.43 rows=1 width=16) (actual time=0.037..111.716 rows=483 loops=1)

  • Buffers: shared hit=11153 read=4
12. 0.904 105.261 ↓ 483.0 483 1

Nested Loop (cost=0.84..1,854.11 rows=1 width=16) (actual time=0.028..105.261 rows=483 loops=1)

  • Buffers: shared hit=9704 read=4
13. 0.872 57.981 ↓ 527.0 1,054 1

Nested Loop (cost=0.42..1,837.24 rows=2 width=49) (actual time=0.015..57.981 rows=1,054 loops=1)

  • Buffers: shared hit=5478
14. 50.785 50.785 ↓ 175.7 1,054 1

Seq Scan on "EventSS" l (cost=0.00..1,786.57 rows=6 width=57) (actual time=0.005..50.785 rows=1,054 loops=1)

  • Filter: (("ClosedReason" = 0) AND (COALESCE("StatusInt", 0) = 0))
  • Rows Removed by Filter: 33963
  • Buffers: shared hit=1261
15. 6.324 6.324 ↑ 1.0 1 1,054

Index Scan using tn_events_pkey on tn_events e (cost=0.42..8.45 rows=1 width=12) (actual time=0.006..0.006 rows=1 loops=1,054)

  • Index Cond: (event_id = l."ApiEventId")
  • Filter: (event_date > now())
  • Buffers: shared hit=4217
16. 46.376 46.376 ↓ 0.0 0 1,054

Index Scan using "Id" on "AspNetUsers" u (cost=0.41..8.43 rows=1 width=41) (actual time=0.044..0.044 rows=0 loops=1,054)

  • Index Cond: ("Id" = l."UserId")
  • Filter: ("TenantId" = 5)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=4226 read=4
17. 5.796 5.796 ↑ 1.0 1 483

Index Scan using tn_venues_pkey on tn_venues v (cost=0.28..0.31 rows=1 width=12) (actual time=0.012..0.012 rows=1 loops=483)

  • Index Cond: (venue_id = e.venue_id)
  • Buffers: shared hit=1449
18. 0.966 0.966 ↑ 1.0 1 483

Index Only Scan using "Tenants_pkey" on "Tenants" t (cost=0.28..8.29 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=483)

  • Index Cond: ("Id" = 5)
  • Heap Fetches: 0
  • Buffers: shared hit=967
19. 41.055 58.926 ↓ 0.0 0 483

Append (cost=0.29..15.05 rows=2 width=8) (actual time=0.122..0.122 rows=0 loops=483)

  • Buffers: shared hit=3369 read=12
20. 0.966 0.966 ↓ 0.0 0 483

Index Only Scan using idx_listingsoldinvoices_eventssid on "ListingSoldInvoices" i (cost=0.29..8.30 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=483)

  • Index Cond: ("EventSSId" = l."Id")
  • Heap Fetches: 0
  • Buffers: shared hit=954 read=12
21. 16.905 16.905 ↓ 0.0 0 483

Seq Scan on resale_invoices i_1 (cost=0.00..6.75 rows=1 width=8) (actual time=0.035..0.035 rows=0 loops=483)

  • Filter: ("EventSSId" = l."Id")
  • Rows Removed by Filter: 150
  • Buffers: shared hit=2415
22. 416.346 416.346 ↑ 1.0 1,373 483

CTE Scan on price_suggest ps (cost=0.00..27.46 rows=1,373 width=8) (actual time=0.028..0.862 rows=1,373 loops=483)

  • Buffers: shared hit=76
Planning time : 2.041 ms