explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uprD

Settings
# exclusive inclusive rows x rows loops node
1. 0.258 1,829.853 ↓ 769.0 769 1

Unique (cost=180,045.75..180,045.76 rows=1 width=12) (actual time=1,829.453..1,829.853 rows=769 loops=1)

2. 1.116 1,829.595 ↓ 2,811.0 2,811 1

Sort (cost=180,045.75..180,045.75 rows=1 width=12) (actual time=1,829.452..1,829.595 rows=2,811 loops=1)

  • Sort Key: fo.orchestrator_order_id, fo.original_quantity
  • Sort Method: quicksort Memory: 228kB
3. 11.097 1,828.479 ↓ 2,811.0 2,811 1

Nested Loop (cost=161,919.25..180,045.74 rows=1 width=12) (actual time=963.712..1,828.479 rows=2,811 loops=1)

4. 80.740 1,777.190 ↓ 135.8 10,048 1

Subquery Scan on fo (cost=161,918.82..179,715.51 rows=74 width=12) (actual time=963.588..1,777.190 rows=10,048 loops=1)

  • Filter: ((NOT fo.is_handled) AND (fo.original_quantity > 2) AND (fo.rank = 1))
  • Rows Removed by Filter: 814168
5. 449.744 1,696.450 ↓ 1.6 824,216 1

WindowAgg (cost=161,918.82..172,088.36 rows=508,477 width=29) (actual time=963.532..1,696.450 rows=824,216 loops=1)

6. 803.985 1,246.706 ↓ 1.6 824,216 1

Sort (cost=161,918.82..163,190.01 rows=508,477 width=17) (actual time=963.518..1,246.706 rows=824,216 loops=1)

  • Sort Key: fulfillment_order.orchestrator_order_id, fulfillment_order.version DESC
  • Sort Method: external merge Disk: 21704kB
7. 442.721 442.721 ↓ 1.6 824,216 1

Index Scan using ix_process_id on fulfillment_order (cost=0.43..106,275.82 rows=508,477 width=17) (actual time=6.032..442.721 rows=824,216 loops=1)

  • Index Cond: (process_id = 573)
8. 40.192 40.192 ↓ 0.0 0 10,048

Index Scan using orchestrator_order_award_idx on fulfillment_order_award foa (cost=0.43..4.45 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=10,048)

  • Index Cond: ((orchestrator_order_id = fo.orchestrator_order_id) AND (prize_id = 7503852))
  • Filter: active
Planning time : 0.650 ms
Execution time : 1,837.407 ms