explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TVFQ : Optimization for: Optimization for: Optimization for: plan #Asx7; plan #5Dnd; plan #5xiy

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.001 1,209.366 ↓ 0.0 0 1

Nested Loop Left Join (cost=168,412.89..168,500.39 rows=1 width=253) (actual time=1,209.366..1,209.366 rows=0 loops=1)

2.          

CTE cte_cart_item_funds

3. 0.003 1,209.361 ↓ 0.0 0 1

HashAggregate (cost=168,409.92..168,409.93 rows=1 width=68) (actual time=1,209.361..1,209.361 rows=0 loops=1)

4. 0.008 1,209.358 ↓ 0.0 0 1

Nested Loop (cost=66.19..168,409.91 rows=1 width=68) (actual time=1,209.358..1,209.358 rows=0 loops=1)

5. 0.015 1,209.326 ↓ 12.0 12 1

Nested Loop (cost=65.91..168,407.75 rows=1 width=102) (actual time=1,153.049..1,209.326 rows=12 loops=1)

6. 313.350 1,209.275 ↓ 12.0 12 1

Hash Join (cost=65.49..168,404.78 rows=1 width=68) (actual time=1,153.030..1,209.275 rows=12 loops=1)

  • Hash Cond: (((o.cart_id)::bpchar = (i_1.cart_id)::bpchar) AND ((o.cart_item_id)::bpchar = (i_1.cart_item_id)::bpchar))
7. 895.880 895.880 ↓ 1.0 1,314,839 1

Seq Scan on fnd_order_journal o (cost=0.00..158,529.16 rows=1,308,015 width=68) (actual time=0.008..895.880 rows=1,314,839 loops=1)

  • Filter: ((type_entry)::text = 'APPLY'::text)
  • Rows Removed by Filter: 1320577
8. 0.004 0.045 ↑ 1.5 12 1

Hash (cost=65.22..65.22 rows=18 width=34) (actual time=0.045..0.045 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
9. 0.041 0.041 ↑ 1.5 12 1

Index Scan using ix_ord_items_order_id on ord_items i_1 (cost=0.43..65.22 rows=18 width=34) (actual time=0.015..0.041 rows=12 loops=1)

  • Index Cond: ((order_id)::bpchar = 'OR18110003408171'::bpchar)
10. 0.036 0.036 ↑ 1.0 1 12

Index Scan using pk_fnd_funds on fnd_funds d_4 (cost=0.42..2.97 rows=1 width=51) (actual time=0.003..0.003 rows=1 loops=12)

  • Index Cond: ((fund_id)::bpchar = (o.fund_id)::bpchar)
11. 0.024 0.024 ↓ 0.0 0 12

Index Scan using ix_fnd_budgets_budget_id on fnd_budgets b (cost=0.28..2.15 rows=1 width=34) (actual time=0.002..0.002 rows=0 loops=12)

  • Index Cond: ((budget_id)::bpchar = (d_4.budget_id)::bpchar)
  • Filter: (((budget_type)::text = 'ASSETS'::text) AND ((d_4.master_account_id)::bpchar = (master_account_id)::bpchar))
  • Rows Removed by Filter: 1
12. 0.000 1,209.365 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.40..86.24 rows=1 width=229) (actual time=1,209.365..1,209.365 rows=0 loops=1)

13. 0.001 1,209.365 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.85..82.16 rows=1 width=205) (actual time=1,209.365..1,209.365 rows=0 loops=1)

14. 0.000 1,209.364 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.29..78.08 rows=1 width=181) (actual time=1,209.364..1,209.364 rows=0 loops=1)

15. 0.001 1,209.364 ↓ 0.0 0 1

Nested Loop (cost=0.86..73.97 rows=1 width=157) (actual time=1,209.364..1,209.364 rows=0 loops=1)

16. 0.000 1,209.363 ↓ 0.0 0 1

Nested Loop (cost=0.43..65.51 rows=1 width=66) (actual time=1,209.363..1,209.363 rows=0 loops=1)

  • Join Filter: (((i.cart_id)::bpchar = (c.cart_id)::bpchar) AND ((i.cart_item_id)::bpchar = (c.cart_item_id)::bpchar))
17. 1,209.363 1,209.363 ↓ 0.0 0 1

CTE Scan on cte_cart_item_funds c (cost=0.00..0.02 rows=1 width=96) (actual time=1,209.363..1,209.363 rows=0 loops=1)

18. 0.000 0.000 ↓ 0.0 0

Index Scan using ix_ord_items_order_id on ord_items i (cost=0.43..65.22 rows=18 width=34) (never executed)

  • Index Cond: ((order_id)::bpchar = 'OR18110003408171'::bpchar)
19. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_fnd_order_journal on fnd_order_journal f (cost=0.43..8.45 rows=1 width=123) (never executed)

  • Index Cond: ((fund_journal_id)::bpchar = c.fund_journal_id)
20. 0.000 0.000 ↓ 0.0 0

Index Scan using ix_fnd_order_journal_details_fund_journal_id on fnd_order_journal_details d (cost=0.43..4.09 rows=2 width=41) (never executed)

  • Index Cond: ((f.fund_journal_id)::bpchar = (fund_journal_id)::bpchar)
  • Filter: ((price_group)::text = 'BASE PRICE'::text)
21. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_fnd_order_journal_details on fnd_order_journal_details d_1 (cost=0.56..4.07 rows=1 width=41) (never executed)

  • Index Cond: (((f.fund_journal_id)::bpchar = (fund_journal_id)::bpchar) AND ((price_group)::text = 'POSTAGE'::text))
22. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_fnd_order_journal_details on fnd_order_journal_details d_2 (cost=0.56..4.07 rows=1 width=41) (never executed)

  • Index Cond: (((f.fund_journal_id)::bpchar = (fund_journal_id)::bpchar) AND ((price_group)::text = 'SHIPPING'::text))
23. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_fnd_order_journal_details on fnd_order_journal_details d_3 (cost=0.56..4.07 rows=1 width=41) (never executed)

  • Index Cond: (((f.fund_journal_id)::bpchar = (fund_journal_id)::bpchar) AND ((price_group)::text = 'TAX'::text))