explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lfhR : ABC

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 281,382.251 ↓ 50.0 50 1

Limit (cost=572.79..572.80 rows=1 width=226) (actual time=281,382.239..281,382.251 rows=50 loops=1)

2. 0.136 281,382.244 ↓ 50.0 50 1

Sort (cost=572.79..572.80 rows=1 width=226) (actual time=281,382.239..281,382.244 rows=50 loops=1)

  • Sort Key: runner_fairlay.id DESC
  • Sort Method: quicksort Memory: 38kB
3. 0.046 281,382.108 ↓ 50.0 50 1

Nested Loop Left Join (cost=6.00..572.78 rows=1 width=226) (actual time=280,965.184..281,382.108 rows=50 loops=1)

4. 0.076 281,381.912 ↓ 50.0 50 1

Nested Loop (cost=5.58..572.28 rows=1 width=112) (actual time=280,965.168..281,381.912 rows=50 loops=1)

5. 0.093 281,381.636 ↓ 50.0 50 1

Nested Loop (cost=5.15..571.70 rows=1 width=45) (actual time=280,965.141..281,381.636 rows=50 loops=1)

  • Join Filter: (runner_fairlay_1.id = orderbook_instance_fairlay.runner_fairlay_id)
6. 0.066 281,359.093 ↑ 1.0 50 1

Nested Loop (cost=4.72..546.52 rows=50 width=41) (actual time=280,942.919..281,359.093 rows=50 loops=1)

7. 0.035 281,343.777 ↑ 1.0 50 1

Limit (cost=4.29..123.02 rows=50 width=8) (actual time=280,927.864..281,343.777 rows=50 loops=1)

8. 0.090 281,343.742 ↑ 8,924.8 50 1

GroupAggregate (cost=4.29..1,059,638.41 rows=446,241 width=8) (actual time=280,927.862..281,343.742 rows=50 loops=1)

  • Group Key: runner_fairlay_1.id
9. 2.474 281,343.652 ↑ 5,795.3 77 1

Nested Loop (cost=4.29..1,052,944.79 rows=446,241 width=8) (actual time=280,927.798..281,343.652 rows=77 loops=1)

10. 703.178 195,241.821 ↓ 1.6 1,212,667 1

Merge Join (cost=3.86..623,577.64 rows=780,043 width=8) (actual time=3.455..195,241.821 rows=1,212,667 loops=1)

  • Merge Cond: (runner_fairlay_1.id = orderbook_instance_fairlay_1.runner_fairlay_id)
11. 269.854 93,646.646 ↓ 1.6 388,743 1

Nested Loop (cost=1.83..463,698.89 rows=242,296 width=4) (actual time=0.065..93,646.646 rows=388,743 loops=1)

12. 490.201 85,990.675 ↓ 1.6 388,743 1

Merge Left Join (cost=1.41..340,460.05 rows=242,296 width=8) (actual time=0.030..85,990.675 rows=388,743 loops=1)

  • Merge Cond: (runner_fairlay_1.id = runner_ohlc_1.runner_fairlay_id)
  • Filter: (runner_ohlc_1.ask_open IS NULL)
  • Rows Removed by Filter: 317372
13. 34,253.279 34,253.279 ↑ 1.6 706,115 1

Index Scan using runner_fairlay_pkey on runner_fairlay runner_fairlay_1 (cost=0.43..276,015.91 rows=1,151,780 width=8) (actual time=0.008..34,253.279 rows=706,115 loops=1)

14. 51,247.195 51,247.195 ↑ 1.1 384,731 1

Index Scan using runner_ohlc_runner_fairlay_id_key on runner_ohlc runner_ohlc_1 (cost=0.42..56,411.67 rows=412,242 width=17) (actual time=0.006..51,247.195 rows=384,731 loops=1)

15. 7,386.117 7,386.117 ↑ 1.0 1 388,743

Index Only Scan using market_fairlay_pkey on market_fairlay (cost=0.42..0.50 rows=1 width=4) (actual time=0.003..0.019 rows=1 loops=388,743)

  • Index Cond: (id = runner_fairlay_1.market_fairlay_id)
  • Heap Fetches: 2636
16. 100,891.997 100,891.997 ↑ 1.5 2,550,654 1

Index Scan using ix_runner_fairlay_id on orderbook_instance_fairlay orderbook_instance_fairlay_1 (cost=0.43..142,488.07 rows=3,708,017 width=8) (actual time=0.007..100,891.997 rows=2,550,654 loops=1)

17. 86,099.357 86,099.357 ↓ 0.0 0 1,212,667

Index Scan using ix_orderbook_instance_fairlay_id on order_instance_fairlay order_instance_fairlay_1 (cost=0.43..0.54 rows=1 width=8) (actual time=0.071..0.071 rows=0 loops=1,212,667)

  • Index Cond: (orderbook_instance_fairlay_id = orderbook_instance_fairlay_1.id)
  • Filter: ((bid_or_ask)::text = 'ask'::text)
  • Rows Removed by Filter: 1
18. 15.250 15.250 ↑ 1.0 1 50

Index Scan using order_instance_fairlay_pkey on order_instance_fairlay (cost=0.43..8.45 rows=1 width=37) (actual time=0.305..0.305 rows=1 loops=50)

  • Index Cond: (id = (min(order_instance_fairlay_1.id)))
19. 22.450 22.450 ↑ 1.0 1 50

Index Scan using orderbook_instance_fairlay_pkey on orderbook_instance_fairlay (cost=0.43..0.49 rows=1 width=8) (actual time=0.449..0.449 rows=1 loops=50)

  • Index Cond: (id = order_instance_fairlay.orderbook_instance_fairlay_id)
20. 0.200 0.200 ↑ 1.0 1 50

Index Scan using runner_fairlay_pkey on runner_fairlay (cost=0.43..0.56 rows=1 width=75) (actual time=0.004..0.004 rows=1 loops=50)

  • Index Cond: (id = orderbook_instance_fairlay.runner_fairlay_id)
21. 0.150 0.150 ↓ 0.0 0 50

Index Scan using runner_ohlc_runner_fairlay_id_key on runner_ohlc (cost=0.42..0.50 rows=1 width=114) (actual time=0.003..0.003 rows=0 loops=50)

  • Index Cond: (runner_fairlay.id = runner_fairlay_id)