explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lJtq

Settings
# exclusive inclusive rows x rows loops node
1. 2.064 2.064 ↓ 12.0 12 1

CTE Scan on cte_cart_summary s (cost=114.52..114.68 rows=1 width=952) (actual time=1.957..2.064 rows=12 loops=1)

2.          

CTE cte_cart_prices

3. 0.567 1.863 ↓ 12.0 12 1

HashAggregate (cost=114.23..114.41 rows=1 width=671) (actual time=1.844..1.863 rows=12 loops=1)

4. 0.089 1.296 ↓ 84.0 84 1

Nested Loop (cost=80.36..114.00 rows=1 width=671) (actual time=0.781..1.296 rows=84 loops=1)

5. 0.021 1.039 ↓ 84.0 84 1

Nested Loop (cost=79.94..105.47 rows=1 width=667) (actual time=0.761..1.039 rows=84 loops=1)

6. 0.038 0.766 ↓ 84.0 84 1

Hash Right Join (cost=79.51..97.02 rows=1 width=634) (actual time=0.739..0.766 rows=84 loops=1)

  • Hash Cond: (((p.cart_id)::bpchar = (t.cart_id)::bpchar) AND ((p.cart_item_id)::bpchar = (t.cart_item_id)::bpchar))
7. 0.525 0.525 ↓ 0.0 0 1

Function Scan on priv_order_allocated_funds2 p (cost=0.25..10.25 rows=1,000 width=580) (actual time=0.525..0.525 rows=0 loops=1)

8. 0.050 0.203 ↓ 84.0 84 1

Hash (cost=79.24..79.24 rows=1 width=135) (actual time=0.203..0.203 rows=84 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
9. 0.040 0.153 ↓ 84.0 84 1

Hash Join (cost=66.00..79.24 rows=1 width=135) (actual time=0.077..0.153 rows=84 loops=1)

  • Hash Cond: ((b.order_item_id)::bpchar = (t.order_item_id)::bpchar)
10. 0.072 0.072 ↓ 1.2 84 1

Index Scan using ix_ord_orders_order_id on ord_item_details b (cost=0.56..13.53 rows=69 width=73) (actual time=0.023..0.072 rows=84 loops=1)

  • Index Cond: ((order_id)::bpchar = 'OR18110003408171'::bpchar)
  • Filter: (is_active IS TRUE)
11. 0.007 0.041 ↑ 1.5 12 1

Hash (cost=65.22..65.22 rows=18 width=113) (actual time=0.041..0.041 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
12. 0.034 0.034 ↑ 1.5 12 1

Index Scan using ix_ord_items_order_id on ord_items t (cost=0.43..65.22 rows=18 width=113) (actual time=0.011..0.034 rows=12 loops=1)

  • Index Cond: ((order_id)::bpchar = 'OR18110003408171'::bpchar)
  • Filter: (is_active IS TRUE)
13. 0.252 0.252 ↑ 1.0 1 84

Index Scan using pk_ord_orders on ord_orders s_1 (cost=0.43..8.45 rows=1 width=67) (actual time=0.003..0.003 rows=1 loops=84)

  • Index Cond: ((order_id)::bpchar = 'OR18110003408171'::bpchar)
  • Filter: (is_active IS TRUE)
14. 0.168 0.168 ↑ 1.0 1 84

Index Scan using pk_acct_accounts on acct_accounts n (cost=0.42..8.44 rows=1 width=21) (actual time=0.002..0.002 rows=1 loops=84)

  • Index Cond: ((account_id)::bpchar = (t.account_id)::bpchar)
15.          

CTE cte_cart_summary

16. 0.055 1.937 ↓ 12.0 12 1

HashAggregate (cost=0.10..0.11 rows=1 width=980) (actual time=1.925..1.937 rows=12 loops=1)

17. 1.882 1.882 ↓ 12.0 12 1

CTE Scan on cte_cart_prices cp (cost=0.00..0.02 rows=1 width=980) (actual time=1.847..1.882 rows=12 loops=1)