explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qgpP

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 1,404.023 ↓ 0.0 0 1

Unique (cost=260,395.89..260,395.90 rows=1 width=12) (actual time=1,404.023..1,404.023 rows=0 loops=1)

2. 0.005 1,404.023 ↓ 0.0 0 1

Sort (cost=260,395.89..260,395.90 rows=1 width=12) (actual time=1,404.023..1,404.023 rows=0 loops=1)

  • Sort Key: fo.orchestrator_order_id, fo.original_quantity
  • Sort Method: quicksort Memory: 25kB
3. 0.001 1,404.018 ↓ 0.0 0 1

Nested Loop (cost=223,367.34..260,395.88 rows=1 width=12) (actual time=1,404.018..1,404.018 rows=0 loops=1)

4. 0.001 1,404.017 ↓ 0.0 0 1

Nested Loop (cost=223,366.91..256,987.67 rows=1 width=16) (actual time=1,404.017..1,404.017 rows=0 loops=1)

5. 59.499 1,404.016 ↓ 0.0 0 1

Subquery Scan on fo (cost=223,366.48..256,403.09 rows=131 width=16) (actual time=1,404.016..1,404.016 rows=0 loops=1)

  • Filter: ((NOT fo.is_handled) AND (fo.original_quantity > 2) AND (fo.rank = 1))
  • Rows Removed by Filter: 967501
6. 351.771 1,344.517 ↓ 1.0 967,501 1

WindowAgg (cost=223,366.48..242,244.54 rows=943,903 width=29) (actual time=727.071..1,344.517 rows=967,501 loops=1)

7. 673.049 992.746 ↓ 1.0 967,501 1

Sort (cost=223,366.48..225,726.24 rows=943,903 width=21) (actual time=727.062..992.746 rows=967,501 loops=1)

  • Sort Key: fulfillment_order.orchestrator_order_id, fulfillment_order.version DESC
  • Sort Method: external merge Disk: 29256kB
8. 319.697 319.697 ↓ 1.0 967,501 1

Index Scan using ix_process_id on fulfillment_order (cost=0.43..115,864.73 rows=943,903 width=21) (actual time=0.017..319.697 rows=967,501 loops=1)

  • Index Cond: (process_id = 573)
9. 0.000 0.000 ↓ 0.0 0

Index Scan using orchestrator_order_award_idx on fulfillment_order_award foa (cost=0.43..4.45 rows=1 width=8) (never executed)

  • Index Cond: ((orchestrator_order_id = fo.orchestrator_order_id) AND (prize_id = 7503852))
  • Filter: active
10. 0.000 0.000 ↓ 0.0 0

Index Only Scan using ix_customer_data on customer_data cd (cost=0.42..3,408.20 rows=1 width=4) (never executed)

  • Index Cond: (customer_registration_number = fo.customer_registration_number)
  • Heap Fetches: 0
Planning time : 0.683 ms
Execution time : 1,417.659 ms