explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DjKG

Settings
# exclusive inclusive rows x rows loops node
1. 0.258 1,810.516 ↓ 2.1 769 1

Unique (cost=280,908.06..280,910.85 rows=372 width=12) (actual time=1,810.101..1,810.516 rows=769 loops=1)

2. 0.847 1,810.258 ↓ 7.6 2,811 1

Sort (cost=280,908.06..280,908.99 rows=372 width=12) (actual time=1,810.100..1,810.258 rows=2,811 loops=1)

  • Sort Key: fo.orchestrator_order_id, fo.original_quantity
  • Sort Method: quicksort Memory: 228kB
3. 5.357 1,809.411 ↓ 7.6 2,811 1

Merge Join (cost=162,235.51..280,892.18 rows=372 width=12) (actual time=1,384.371..1,809.411 rows=2,811 loops=1)

  • Merge Cond: (fo.orchestrator_order_id = foa.orchestrator_order_id)
4. 41.880 993.190 ↑ 7.6 10,048 1

Subquery Scan on fo (cost=162,235.08..170,521.10 rows=76,517 width=12) (actual time=629.733..993.190 rows=10,048 loops=1)

  • Filter: ((NOT fo.is_handled) AND (fo.original_quantity > 2))
  • Rows Removed by Filter: 473882
5. 81.621 951.310 ↓ 1.1 483,930 1

Unique (cost=162,235.08..164,782.33 rows=459,102 width=21) (actual time=629.707..951.310 rows=483,930 loops=1)

6. 591.542 869.689 ↓ 1.6 824,216 1

Sort (cost=162,235.08..163,508.70 rows=509,450 width=21) (actual time=629.707..869.689 rows=824,216 loops=1)

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

Index Scan using ix_process_id on fulfillment_order (cost=0.43..106,477.83 rows=509,450 width=21) (actual time=4.044..278.147 rows=824,216 loops=1)

  • Index Cond: (process_id = 573)
8. 810.864 810.864 ↓ 3.1 33,003 1

Index Scan using orchestrator_order_award_idx on fulfillment_order_award foa (cost=0.43..110,149.37 rows=10,676 width=8) (actual time=666.872..810.864 rows=33,003 loops=1)

  • Index Cond: (prize_id = 7503852)
  • Filter: active
Planning time : 0.235 ms
Execution time : 1,818.203 ms