explain.depesz.com

PostgreSQL's explain analyze made readable

Result: I8hQ : arbs full

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Subquery Scan on arbs_full (cost=1,506,876,076,647.28..1,674,220,474,698.07 rows=1,321,055,028,568 width=642) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Gather Merge (cost=1,506,876,076,647.28..1,661,009,924,412.39 rows=1,321,055,028,568 width=654) (actual rows= loops=)

  • Workers Planned: 2
3. 0.000 0.000 ↓ 0.0

Sort (cost=1,506,876,075,647.25..1,508,527,394,432.96 rows=660,527,514,284 width=654) (actual rows= loops=)

  • Sort Key: event__arb__creation.timestamp_epoch DESC
4. 0.000 0.000 ↓ 0.0

Merge Join (cost=3,470,897.96..33,889,451,046.89 rows=660,527,514,284 width=654) (actual rows= loops=)

  • Merge Cond: (arb.oe_exchange_ask_ulid = oe_exchange_ask_event.ulid)
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=600,179.77..14,693,741,486.66 rows=6,931,811,575 width=516) (actual rows= loops=)

  • Join Filter: (arb.oe_osmo_ask_ulid = oe_osmo_ask_event.ulid)
6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=600,179.22..4,198,236,797.34 rows=1,892,443,137 width=570) (actual rows= loops=)

  • Join Filter: (arb.oe_osmo_bid_ulid = oe_osmo_bid_event.ulid)
7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=600,178.67..1,332,875,327.62 rows=516,652,968 width=624) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=600,178.11..344,985,683.90 rows=141,050,626 width=643) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=600,177.56..75,283,461.92 rows=38,508,013 width=662) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=600,177.01..1,111,241.16 rows=10,513,013 width=642) (actual rows= loops=)

  • Join Filter: (arb.oe_exchange_bid_ulid = oe_exchange_bid_event.ulid)
11. 0.000 0.000 ↓ 0.0

Merge Join (cost=600,176.46..603,589.71 rows=74,802 width=688) (actual rows= loops=)

  • Merge Cond: (arb.oe_exchange_ask_ulid = oe_exchange_ask.ulid)
12. 0.000 0.000 ↓ 0.0

Sort (cost=429,551.92..429,738.92 rows=74,802 width=644) (actual rows= loops=)

  • Sort Key: arb.oe_exchange_ask_ulid
13. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=299,050.59..402,016.90 rows=74,802 width=644) (actual rows= loops=)

  • Merge Cond: (arb.oe_osmo_ask_ulid = trade_ask.oe_ulid)
14. 0.000 0.000 ↓ 0.0

Merge Join (cost=299,023.20..386,196.13 rows=74,802 width=460) (actual rows= loops=)

  • Merge Cond: (arb.oe_osmo_ask_ulid = oe_osmo_ask.ulid)
15. 0.000 0.000 ↓ 0.0

Sort (cost=298,880.62..299,067.62 rows=74,802 width=433) (actual rows= loops=)

  • Sort Key: arb.oe_osmo_ask_ulid
16. 0.000 0.000 ↓ 0.0

Hash Join (cost=123,655.60..277,995.60 rows=74,802 width=433) (actual rows= loops=)

  • Hash Cond: (arb.oe_exchange_bid_ulid = oe_exchange_bid.ulid)
17. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=164.94..142,367.58 rows=74,802 width=381) (actual rows= loops=)

  • Merge Cond: (arb.oe_osmo_bid_ulid = trade_bid.oe_ulid)
18. 0.000 0.000 ↓ 0.0

Merge Join (cost=137.55..126,546.81 rows=74,802 width=197) (actual rows= loops=)

  • Merge Cond: (oe_osmo_bid.ulid = arb.oe_osmo_bid_ulid)
19. 0.000 0.000 ↓ 0.0

Parallel Index Only Scan using oe_pk on oe oe_osmo_bid (cost=0.42..82,367.27 rows=191,494 width=27) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Index Scan using arb_oe_osmo_bid_ulid_idx on arb (cost=0.42..42,928.99 rows=179,524 width=170) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Index Scan using trade_oe_ulid_idx on trade trade_bid (cost=0.42..14,690.47 rows=202,295 width=211) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Hash (cost=113,256.85..113,256.85 rows=459,585 width=52) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Seq Scan on oe oe_exchange_bid (cost=0.00..113,256.85 rows=459,585 width=52) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Index Only Scan using oe_pk on oe oe_osmo_ask (cost=0.42..85,048.18 rows=459,585 width=27) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Index Scan using trade_oe_ulid_idx on trade trade_ask (cost=0.42..14,690.47 rows=202,295 width=211) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Sort (cost=170,620.76..171,769.72 rows=459,585 width=44) (actual rows= loops=)

  • Sort Key: oe_exchange_ask.ulid
27. 0.000 0.000 ↓ 0.0

Seq Scan on oe oe_exchange_ask (cost=0.00..113,256.85 rows=459,585 width=44) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Index Scan using event_ulid_idx on event oe_exchange_bid_event (cost=0.55..6.74 rows=4 width=35) (actual rows= loops=)

  • Index Cond: ((ulid = oe_exchange_bid.ulid) AND (event_name = 'Creation'::text))
29. 0.000 0.000 ↓ 0.0

Index Scan using event_ulid_idx on event event__arb__creation (cost=0.55..7.02 rows=4 width=47) (actual rows= loops=)

  • Index Cond: ((ulid = arb.ulid) AND (event_name = 'Creation'::text))
30. 0.000 0.000 ↓ 0.0

Index Scan using event_ulid_idx on event trade_bid_event (cost=0.55..6.96 rows=4 width=35) (actual rows= loops=)

  • Index Cond: ((trade_bid.ulid = ulid) AND (event_name = 'Creation'::text))
31. 0.000 0.000 ↓ 0.0

Index Scan using event_ulid_idx on event trade_ask_event (cost=0.55..6.96 rows=4 width=35) (actual rows= loops=)

  • Index Cond: ((trade_ask.ulid = ulid) AND (event_name = 'Creation'::text))
32. 0.000 0.000 ↓ 0.0

Index Only Scan using event_ulid_idx on event oe_osmo_bid_event (cost=0.55..5.50 rows=4 width=27) (actual rows= loops=)

  • Index Cond: ((ulid = oe_osmo_bid.ulid) AND (event_name = 'Creation'::text))
33. 0.000 0.000 ↓ 0.0

Index Only Scan using event_ulid_idx on event oe_osmo_ask_event (cost=0.55..5.50 rows=4 width=27) (actual rows= loops=)

  • Index Cond: ((ulid = oe_osmo_ask.ulid) AND (event_name = 'Creation'::text))
34. 0.000 0.000 ↓ 0.0

Materialize (cost=189,595.20..193,808.00 rows=842,560 width=35) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Sort (cost=189,595.20..191,701.60 rows=842,560 width=35) (actual rows= loops=)

  • Sort Key: oe_exchange_ask_event.ulid
36. 0.000 0.000 ↓ 0.0

Seq Scan on event oe_exchange_ask_event (cost=0.00..83,628.18 rows=842,560 width=35) (actual rows= loops=)

  • Filter: (event_name = 'Creation'::text)