explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qp5b

Settings
# exclusive inclusive rows x rows loops node
1. 0.170 157.978 ↑ 1.0 1 1

Aggregate (cost=21,513.31..21,513.32 rows=1 width=4) (actual time=157.977..157.978 rows=1 loops=1)

  • Buffers: shared hit=22482
2. 0.518 157.808 ↓ 26.9 484 1

Hash Left Join (cost=3,360.99..21,513.08 rows=18 width=2,880) (actual time=54.932..157.808 rows=484 loops=1)

  • Hash Cond: (l."Id" = ps.event_id)
  • Buffers: shared hit=22482
3.          

CTE price_suggest

4. 1.078 1.725 ↑ 1.0 1,373 1

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

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

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

  • Buffers: shared hit=76
6. 0.227 154.308 ↓ 26.9 484 1

Nested Loop (cost=3,201.85..21,350.81 rows=18 width=8) (actual time=51.929..154.308 rows=484 loops=1)

  • Buffers: shared hit=22406
7. 0.244 0.244 ↑ 1.0 1 1

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

  • Filter: ("Id" = 5)
  • Rows Removed by Filter: 1205
  • Buffers: shared hit=155
8. 0.604 153.837 ↓ 26.9 484 1

Hash Left Join (cost=3,201.85..21,180.57 rows=18 width=12) (actual time=51.841..153.837 rows=484 loops=1)

  • Hash Cond: (e.city_id = c.city_id)
  • Buffers: shared hit=22251
9. 27.199 131.267 ↓ 26.9 484 1

Hash Join (cost=1,882.44..19,860.91 rows=18 width=16) (actual time=29.643..131.267 rows=484 loops=1)

  • Hash Cond: ((e.event_id)::integer = l."ApiEventId")
  • Buffers: shared hit=21761
10. 74.440 74.440 ↓ 1.0 103,200 1

Seq Scan on tn_events e (cost=0.00..16,951.09 rows=102,720 width=16) (actual time=0.006..74.440 rows=103,200 loops=1)

  • Filter: (event_date > now())
  • Rows Removed by Filter: 169396
  • Buffers: shared hit=12862
11. 0.212 29.628 ↓ 161.3 484 1

Hash (cost=1,882.40..1,882.40 rows=3 width=20) (actual time=29.627..29.628 rows=484 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 33kB
  • Buffers: shared hit=8899
12. 0.607 29.416 ↓ 161.3 484 1

Nested Loop Left Join (cost=0.70..1,882.40 rows=3 width=20) (actual time=0.053..29.416 rows=484 loops=1)

  • Buffers: shared hit=8899
13. 0.348 21.549 ↓ 161.3 484 1

Nested Loop (cost=0.41..1,837.18 rows=3 width=20) (actual time=0.021..21.549 rows=484 loops=1)

  • Buffers: shared hit=5511
14. 14.847 14.847 ↓ 176.5 1,059 1

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

  • Filter: (("ClosedReason" = 0) AND (COALESCE("StatusInt", 0) = 0))
  • Rows Removed by Filter: 33956
  • Buffers: shared hit=1261
15. 6.354 6.354 ↓ 0.0 0 1,059

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

  • Index Cond: ("Id" = l."UserId")
  • Filter: ("TenantId" = 5)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=4250
16. 0.484 7.260 ↓ 0.0 0 484

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

  • Buffers: shared hit=3388
17. 0.484 0.484 ↓ 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.001..0.001 rows=0 loops=484)

  • Index Cond: ("EventSSId" = l."Id")
  • Heap Fetches: 0
  • Buffers: shared hit=968
18. 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
19. 11.189 21.966 ↑ 1.0 36,863 1

Hash (cost=858.63..858.63 rows=36,863 width=4) (actual time=21.966..21.966 rows=36,863 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 1808kB
  • Buffers: shared hit=490
20. 10.777 10.777 ↑ 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.006..10.777 rows=36,863 loops=1)

  • Buffers: shared hit=490
21. 0.436 2.982 ↑ 1.0 1,373 1

Hash (cost=27.46..27.46 rows=1,373 width=8) (actual time=2.982..2.982 rows=1,373 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 70kB
  • Buffers: shared hit=76
22. 2.546 2.546 ↑ 1.0 1,373 1

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

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