explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FKKP

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 67,405.143 ↓ 50.0 50 1

Limit (cost=638.87..638.87 rows=1 width=226) (actual time=67,405.131..67,405.143 rows=50 loops=1)

2. 0.080 67,405.134 ↓ 50.0 50 1

Sort (cost=638.87..638.87 rows=1 width=226) (actual time=67,405.130..67,405.134 rows=50 loops=1)

  • Sort Key: runner_fairlay.id DESC
  • Sort Method: quicksort Memory: 38kB
3. 0.024 67,405.054 ↓ 50.0 50 1

Nested Loop Left Join (cost=4.40..638.86 rows=1 width=226) (actual time=67,380.834..67,405.054 rows=50 loops=1)

4. 0.214 67,402.830 ↓ 50.0 50 1

Nested Loop (cost=3.98..638.35 rows=1 width=112) (actual time=67,378.753..67,402.830 rows=50 loops=1)

5. 0.066 67,402.316 ↓ 50.0 50 1

Nested Loop (cost=3.55..637.78 rows=1 width=45) (actual time=67,378.643..67,402.316 rows=50 loops=1)

  • Join Filter: (runner_fairlay_1.id = orderbook_instance_fairlay.runner_fairlay_id)
6. 0.198 67,399.200 ↑ 1.0 50 1

Nested Loop (cost=3.12..612.59 rows=50 width=41) (actual time=67,375.670..67,399.200 rows=50 loops=1)

7. 0.011 67,394.402 ↑ 1.0 50 1

Limit (cost=2.69..189.09 rows=50 width=8) (actual time=67,371.023..67,394.402 rows=50 loops=1)

8. 0.349 67,394.391 ↑ 2,836.7 50 1

GroupAggregate (cost=2.69..528,766.23 rows=141,836 width=8) (actual time=67,371.021..67,394.391 rows=50 loops=1)

  • Group Key: runner_fairlay_1.id
9. 121.422 67,394.042 ↑ 2,727.6 52 1

Nested Loop (cost=2.69..526,638.69 rows=141,836 width=8) (actual time=67,370.995..67,394.042 rows=52 loops=1)

10. 235.853 65,383.820 ↓ 1.8 314,800 1

Nested Loop (cost=2.26..431,185.73 rows=173,412 width=8) (actual time=0.124..65,383.820 rows=314,800 loops=1)

11. 242.438 56,642.508 ↓ 5.8 315,017 1

Nested Loop (cost=1.83..367,857.37 rows=53,865 width=4) (actual time=0.115..56,642.508 rows=315,017 loops=1)

12. 478.520 49,154.679 ↓ 5.8 315,017 1

Merge Left Join (cost=1.41..340,460.05 rows=53,865 width=8) (actual time=0.077..49,154.679 rows=315,017 loops=1)

  • Merge Cond: (runner_fairlay_1.id = runner_ohlc_1.runner_fairlay_id)
  • Filter: (runner_ohlc_1.bid_open IS NULL)
  • Rows Removed by Filter: 379686
13. 34,274.119 34,274.119 ↑ 1.7 694,703 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.064..34,274.119 rows=694,703 loops=1)

14. 14,402.040 14,402.040 ↑ 1.1 379,724 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=10) (actual time=0.007..14,402.040 rows=379,724 loops=1)

15. 7,245.391 7,245.391 ↑ 1.0 1 315,017

Index Only Scan using market_fairlay_pkey on market_fairlay (cost=0.42..0.50 rows=1 width=4) (actual time=0.003..0.023 rows=1 loops=315,017)

  • Index Cond: (id = runner_fairlay_1.market_fairlay_id)
  • Heap Fetches: 1848
16. 8,505.459 8,505.459 ↑ 20.0 1 315,017

Index Scan using ix_runner_fairlay_id on orderbook_instance_fairlay orderbook_instance_fairlay_1 (cost=0.43..0.98 rows=20 width=8) (actual time=0.027..0.027 rows=1 loops=315,017)

  • Index Cond: (runner_fairlay_id = runner_fairlay_1.id)
17. 1,888.800 1,888.800 ↓ 0.0 0 314,800

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.006..0.006 rows=0 loops=314,800)

  • Index Cond: (orderbook_instance_fairlay_id = orderbook_instance_fairlay_1.id)
  • Filter: ((bid_or_ask)::text = 'bid'::text)
  • Rows Removed by Filter: 0
18. 4.600 4.600 ↑ 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.092..0.092 rows=1 loops=50)

  • Index Cond: (id = (min(order_instance_fairlay_1.id)))
19. 3.050 3.050 ↑ 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.061..0.061 rows=1 loops=50)

  • Index Cond: (id = order_instance_fairlay.orderbook_instance_fairlay_id)
20. 0.300 0.300 ↑ 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.006..0.006 rows=1 loops=50)

  • Index Cond: (id = orderbook_instance_fairlay.runner_fairlay_id)
21. 2.200 2.200 ↑ 1.0 1 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.043..0.044 rows=1 loops=50)

  • Index Cond: (runner_fairlay.id = runner_fairlay_id)