explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ncks : Optimization for: plan #hzVY

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 65.494 ↑ 1.6 746 1

Limit (cost=18,907.53..19,042.87 rows=1,160 width=126) (actual time=65.173..65.494 rows=746 loops=1)

2. 0.000 68.409 ↑ 1.6 746 1

Gather Merge (cost=18,907.53..19,042.87 rows=1,160 width=126) (actual time=65.172..68.409 rows=746 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.861 185.790 ↑ 2.3 249 3

Sort (cost=17,907.50..17,908.95 rows=580 width=126) (actual time=61.915..61.930 rows=249 loops=3)

  • Sort Key: r.queued_at DESC
  • Sort Method: quicksort Memory: 87kB
4. 0.419 184.929 ↑ 2.3 249 3

Nested Loop Left Join (cost=1.54..17,880.88 rows=580 width=126) (actual time=0.578..61.643 rows=249 loops=3)

5. 5.429 178.542 ↑ 2.3 249 3

Nested Loop (cost=1.12..17,382.12 rows=580 width=113) (actual time=0.549..59.514 rows=249 loops=3)

6. 10.653 10.653 ↑ 1.5 2,708 3

Parallel Index Scan using risk_assessments_submitted_at_game_queued_at on risk_assessments r (cost=0.56..7,544.26 rows=3,929 width=100) (actual time=0.027..3.551 rows=2,708 loops=3)

  • Index Cond: ((CURRENT_DATE < submitted_at) AND ((game)::text = 'PREMATCH'::text))
7. 162.460 162.460 ↓ 0.0 0 8,123

Index Scan using authorizations_pkey on authorizations a (cost=0.56..2.50 rows=1 width=49) (actual time=0.020..0.020 rows=0 loops=8,123)

  • Index Cond: ((betslip_id)::text = (r.betslip_id)::text)
  • Filter: ((authorization_type)::text = 'BETSLIP'::text)
8. 5.968 5.968 ↑ 1.0 1 746

Index Scan using customers_contract_id on customers c (cost=0.42..0.86 rows=1 width=29) (actual time=0.008..0.008 rows=1 loops=746)

  • Index Cond: (r.contract_id = contract_id)
Planning time : 0.647 ms
Execution time : 68.578 ms