explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PXqa

Settings
# exclusive inclusive rows x rows loops node
1. 0.185 425.156 ↑ 1.0 1 1

Aggregate (cost=3,195.60..3,195.62 rows=1 width=4) (actual time=425.155..425.156 rows=1 loops=1)

  • Buffers: shared hit=89535 read=642
2. 152.436 424.971 ↓ 484.0 484 1

Nested Loop Left Join (cost=1,969.23..3,195.59 rows=1 width=3,280) (actual time=36.477..424.971 rows=484 loops=1)

  • Join Filter: (l."Id" = ps.event_id)
  • Rows Removed by Join Filter: 664464
  • Buffers: shared hit=89535 read=642
3.          

CTE price_suggest

4. 1.033 1.653 ↑ 1.0 1,373 1

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

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

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

  • Buffers: shared hit=76
6. 0.403 116.687 ↓ 484.0 484 1

Nested Loop Left Join (cost=1,854.72..3,036.46 rows=1 width=8) (actual time=34.742..116.687 rows=484 loops=1)

  • Buffers: shared hit=89459 read=642
7. 0.508 108.540 ↓ 484.0 484 1

Nested Loop (cost=1,854.44..3,021.39 rows=1 width=8) (actual time=34.704..108.540 rows=484 loops=1)

  • Buffers: shared hit=86082 read=631
8. 11.633 52.372 ↓ 484.0 484 1

Hash Join (cost=1,854.44..2,851.31 rows=1 width=12) (actual time=34.631..52.372 rows=484 loops=1)

  • Hash Cond: (c.city_id = v.venue_city)
  • Buffers: shared hit=11062 read=631
9. 8.468 8.468 ↑ 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.007..8.468 rows=36,863 loops=1)

  • Buffers: shared hit=490
10. 0.225 32.271 ↓ 484.0 484 1

Hash (cost=1,854.43..1,854.43 rows=1 width=16) (actual time=32.271..32.271 rows=484 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 31kB
  • Buffers: shared hit=10572 read=631
11. 0.693 32.046 ↓ 484.0 484 1

Nested Loop (cost=1.12..1,854.43 rows=1 width=16) (actual time=0.070..32.046 rows=484 loops=1)

  • Buffers: shared hit=10572 read=631
12. 0.839 30.385 ↓ 484.0 484 1

Nested Loop (cost=0.84..1,854.11 rows=1 width=16) (actual time=0.048..30.385 rows=484 loops=1)

  • Buffers: shared hit=9132 read=616
13. 0.939 20.015 ↓ 529.5 1,059 1

Nested Loop (cost=0.42..1,837.24 rows=2 width=49) (actual time=0.017..20.015 rows=1,059 loops=1)

  • Buffers: shared hit=5155 read=343
14. 14.840 14.840 ↓ 176.5 1,059 1

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

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

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

  • Index Cond: (event_id = l."ApiEventId")
  • Filter: (event_date > now())
  • Buffers: shared hit=3894 read=343
16. 9.531 9.531 ↓ 0.0 0 1,059

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

  • Index Cond: ("Id" = l."UserId")
  • Filter: ("TenantId" = 5)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=3977 read=273
17. 0.968 0.968 ↑ 1.0 1 484

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

  • Index Cond: (venue_id = e.venue_id)
  • Buffers: shared hit=1440 read=15
18. 55.660 55.660 ↑ 1.0 1 484

Seq Scan on "Tenants" t (cost=0.00..170.06 rows=1 width=4) (actual time=0.033..0.115 rows=1 loops=484)

  • Filter: ("Id" = 5)
  • Rows Removed by Filter: 1205
  • Buffers: shared hit=75020
19. 0.484 7.744 ↓ 0.0 0 484

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

  • Buffers: shared hit=3377 read=11
20. 0.968 0.968 ↓ 0.0 0 484

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=484)

  • Index Cond: ("EventSSId" = l."Id")
  • Heap Fetches: 0
  • Buffers: shared hit=957 read=11
21. 6.292 6.292 ↓ 0.0 0 484

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

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

CTE Scan on price_suggest ps (cost=0.00..27.46 rows=1,373 width=8) (actual time=0.003..0.322 rows=1,373 loops=484)

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