explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QRBC

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.040 ↑ 1.0 1 1

Aggregate (cost=49.67..49.69 rows=1 width=0) (actual time=0.040..0.040 rows=1 loops=1)

2.          

Initplan (forAggregate)

3. 0.000 0.009 ↑ 1.0 1 1

Aggregate (cost=24.83..24.84 rows=1 width=0) (actual time=0.009..0.009 rows=1 loops=1)

4.          

Initplan (forAggregate)

5. 0.000 0.006 ↓ 0.0 0 1

Limit (cost=8.28..8.28 rows=1 width=4) (actual time=0.006..0.006 rows=0 loops=1)

6. 0.005 0.006 ↓ 0.0 0 1

Sort (cost=8.28..8.28 rows=1 width=4) (actual time=0.006..0.006 rows=0 loops=1)

  • Sort Key: global_order.order_head.id
  • Sort Method: quicksort Memory: 25kB
7. 0.001 0.001 ↓ 0.0 0 1

Index Scan using global_order_order_head_customer_order_id on order_head (cost=0.00..8.27 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (customer_order_id = 1)
8. 0.000 0.008 ↓ 0.0 0 1

Nested Loop (cost=0.00..16.55 rows=1 width=0) (actual time=0.008..0.008 rows=0 loops=1)

9. 0.008 0.008 ↓ 0.0 0 1

Index Scan using global_order_order_item_order_head_id on order_item oi (cost=0.00..8.27 rows=1 width=4) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: (order_head_id = $0)
10. 0.000 0.000 ↓ 0.0 0

Index Scan using order_head_pkey on order_head oh (cost=0.00..8.27 rows=1 width=4) (never executed)

  • Index Cond: (id = $0)
11. 0.000 0.017 ↓ 0.0 0 1

Limit (cost=8.28..8.28 rows=1 width=4) (actual time=0.017..0.017 rows=0 loops=1)

12. 0.009 0.017 ↓ 0.0 0 1

Sort (cost=8.28..8.28 rows=1 width=4) (actual time=0.017..0.017 rows=0 loops=1)

  • Sort Key: global_order.order_head.id
  • Sort Method: quicksort Memory: 25kB
13. 0.008 0.008 ↓ 0.0 0 1

Index Scan using global_order_order_head_customer_order_id on order_head (cost=0.00..8.27 rows=1 width=4) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: (customer_order_id = 1)
14. 0.000 0.021 ↓ 0.0 0 1

Nested Loop (cost=0.00..16.55 rows=1 width=0) (actual time=0.021..0.021 rows=0 loops=1)

15. 0.021 0.021 ↓ 0.0 0 1

Index Scan using global_order_order_item_order_head_id on order_item oi (cost=0.00..8.27 rows=1 width=36) (actual time=0.021..0.021 rows=0 loops=1)

  • Index Cond: (order_head_id = $2)
  • Filter: (vdarab = darab)
16. 0.000 0.000 ↓ 0.0 0

Index Scan using order_head_pkey on order_head oh (cost=0.00..8.27 rows=1 width=4) (never executed)

  • Index Cond: (id = $2)
  • Filter: ((sztime IS NOT NULL) OR (ztime IS NOT NULL))