explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AHH8

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 0.100 ↑ 6.0 1 1

Nested Loop Left Join (cost=93.13..134.81 rows=6 width=403) (actual time=0.099..0.100 rows=1 loops=1)

  • Join Filter: (subordertable.suborderid = orderstatustimestamps.suborderid)
2. 0.021 0.085 ↑ 6.0 1 1

Hash Join (cost=92.84..126.27 rows=6 width=418) (actual time=0.084..0.085 rows=1 loops=1)

  • Hash Cond: ((("*SELECT* 1".suborderstatusvalue)::numeric) = CASE WHEN ((shipmenttable_1.pickupdate IS NOT NULL) AND (subordertable.suborderstatusvalue = 2)) THEN 2.5 ELSE (subordertable.suborders
3. 0.013 0.025 ↑ 115.5 11 1

HashAggregate (cost=51.31..64.02 rows=1,271 width=64) (actual time=0.018..0.025 rows=11 loops=1)

  • Group Key: (("*SELECT* 1".suborderstatusvalue)::numeric), "*SELECT* 1".suborderstatus
4. 0.001 0.012 ↑ 115.5 11 1

Append (cost=0.00..44.95 rows=1,271 width=64) (actual time=0.007..0.012 rows=11 loops=1)

5. 0.004 0.010 ↑ 127.0 10 1

Subquery Scan on *SELECT* 1 (cost=0.00..38.58 rows=1,270 width=64) (actual time=0.006..0.010 rows=10 loops=1)

6. 0.006 0.006 ↑ 127.0 10 1

Seq Scan on convertortable (cost=0.00..22.70 rows=1,270 width=36) (actual time=0.005..0.006 rows=10 loops=1)

7. 0.001 0.001 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=64) (actual time=0.001..0.001 rows=1 loops=1)

8. 0.005 0.039 ↑ 1.0 1 1

Hash (cost=41.53..41.53 rows=1 width=398) (actual time=0.039..0.039 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 0.004 0.034 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.42..41.53 rows=1 width=398) (actual time=0.033..0.034 rows=1 loops=1)

10. 0.002 0.028 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.14..33.22 rows=1 width=233) (actual time=0.027..0.028 rows=1 loops=1)

11. 0.002 0.025 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.86..24.92 rows=1 width=226) (actual time=0.024..0.025 rows=1 loops=1)

12. 0.003 0.019 ↑ 1.0 1 1

Nested Loop (cost=0.58..16.62 rows=1 width=222) (actual time=0.018..0.019 rows=1 loops=1)

13. 0.011 0.011 ↑ 1.0 1 1

Index Scan using subordertable_pkey on subordertable (cost=0.29..8.31 rows=1 width=152) (actual time=0.010..0.011 rows=1 loops=1)

  • Index Cond: (suborderid = 12540)
  • Filter: (storeid = 2251)
14. 0.005 0.005 ↑ 1.0 1 1

Index Scan using producttable_pkey on producttable (cost=0.29..8.31 rows=1 width=78) (actual time=0.005..0.005 rows=1 loops=1)

  • Index Cond: (productid = subordertable.productid)
15. 0.004 0.004 ↑ 1.0 1 1

Index Scan using shipmenttable_pkey on shipmenttable shipmenttable_1 (cost=0.28..8.30 rows=1 width=12) (actual time=0.004..0.004 rows=1 loops=1)

  • Index Cond: (subordertable.subordershipmentid = shipmentid)
16. 0.001 0.001 ↓ 0.0 0 1

Index Scan using couponmanagementtable_pkey on couponmanagementtable (cost=0.28..8.29 rows=1 width=15) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (couponid = subordertable.couponid)
17. 0.002 0.002 ↑ 1.0 1 1

Index Scan using shipmenttable_pkey on shipmenttable (cost=0.28..8.30 rows=1 width=165) (actual time=0.002..0.002 rows=1 loops=1)

  • Index Cond: (subordertable.subordershipmentid = shipmentid)
18. 0.001 0.006 ↑ 1.0 1 1

Materialize (cost=0.29..8.31 rows=1 width=16) (actual time=0.006..0.006 rows=1 loops=1)

19. 0.005 0.005 ↑ 1.0 1 1

Index Scan using orderstatustimestamps_pkey on orderstatustimestamps (cost=0.29..8.30 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=1)

  • Index Cond: (suborderid = 12540)
Planning time : 1.993 ms
Execution time : 0.213 ms