explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VVO7 : De tweede query

Settings
# exclusive inclusive rows x rows loops node
1. 1.092 391,398.400 ↓ 153.8 769 1

Unique (cost=241,701.11..241,701.15 rows=5 width=12) (actual time=391,396.387..391,398.400 rows=769 loops=1)

2. 45.221 391,397.308 ↓ 3,076.0 15,380 1

Sort (cost=241,701.11..241,701.12 rows=5 width=12) (actual time=391,396.387..391,397.308 rows=15,380 loops=1)

  • Sort Key: fo.orchestrator_order_id, fo.original_quantity
  • Sort Method: quicksort Memory: 1105kB
3. 33.707 391,352.087 ↓ 3,076.0 15,380 1

Nested Loop (cost=161,442.89..241,701.05 rows=5 width=12) (actual time=1,167.864..391,352.087 rows=15,380 loops=1)

4. 8.275 1,814.976 ↓ 2,811.0 2,811 1

Nested Loop (cost=161,442.45..179,513.38 rows=1 width=16) (actual time=919.165..1,814.976 rows=2,811 loops=1)

5. 67.451 1,726.317 ↓ 137.6 10,048 1

Subquery Scan on fo (cost=161,442.02..179,187.62 rows=73 width=16) (actual time=919.009..1,726.317 rows=10,048 loops=1)

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

WindowAgg (cost=161,442.02..171,582.36 rows=507,017 width=482) (actual time=918.947..1,658.866 rows=824,216 loops=1)

7. 707.887 1,189.810 ↓ 1.6 824,216 1

Sort (cost=161,442.02..162,709.56 rows=507,017 width=21) (actual time=918.925..1,189.810 rows=824,216 loops=1)

  • Sort Key: fulfillment_order.orchestrator_order_id, fulfillment_order.version DESC
  • Sort Method: external merge Disk: 24928kB
8. 481.923 481.923 ↓ 1.6 824,216 1

Index Scan using ix_process_id on fulfillment_order (cost=0.43..105,970.42 rows=507,017 width=21) (actual time=9.388..481.923 rows=824,216 loops=1)

  • Index Cond: (process_id = 573)
9. 80.384 80.384 ↓ 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.007..0.008 rows=0 loops=10,048)

  • Index Cond: ((orchestrator_order_id = fo.orchestrator_order_id) AND (prize_id = 7503852))
  • Filter: active
10. 389,503.404 389,503.404 ↑ 1.0 5 2,811

Index Only Scan using ix_customer_data on customer_data cd (cost=0.43..62,187.62 rows=5 width=4) (actual time=59.851..138.564 rows=5 loops=2,811)

  • Index Cond: (customer_registration_number = fo.customer_registration_number)
  • Heap Fetches: 2814
Planning time : 3.218 ms
Execution time : 391,407.562 ms