explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WAAm

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 307.489 ↑ 1.0 5 1

Limit (cost=2.29..13,843.14 rows=5 width=405) (actual time=45.380..307.489 rows=5 loops=1)

2. 0.112 307.483 ↑ 171.0 5 1

GroupAggregate (cost=2.29..2,366,787.63 rows=855 width=405) (actual time=45.379..307.483 rows=5 loops=1)

  • Group Key: ordertable.orderid
3. 0.014 307.371 ↑ 142.5 6 1

Nested Loop (cost=2.29..2,366,706.40 rows=855 width=208) (actual time=39.464..307.371 rows=6 loops=1)

4. 0.015 307.315 ↑ 142.5 6 1

Nested Loop (cost=1.72..2,359,364.09 rows=855 width=172) (actual time=39.450..307.315 rows=6 loops=1)

  • Join Filter: (subordertable.suborderstatusvalue = convertortable.suborderstatusvalue)
  • Rows Removed by Join Filter: 42
5. 0.014 307.282 ↑ 142.5 6 1

Nested Loop (cost=1.72..2,359,247.55 rows=855 width=148) (actual time=39.437..307.282 rows=6 loops=1)

6. 0.050 307.232 ↑ 142.5 6 1

Nested Loop Left Join (cost=1.29..2,352,160.57 rows=855 width=127) (actual time=39.424..307.232 rows=6 loops=1)

  • Filter: ((subordertable.suborderstatusvalue <> 3) OR ((subordertable.suborderstatusvalue = 3) AND (shipmenttable.trackingstatus = 'Returning to Shipper'::text)))
  • Rows Removed by Filter: 162
7. 0.195 306.678 ↑ 5.3 168 1

Nested Loop Left Join (cost=0.86..2,344,802.18 rows=887 width=96) (actual time=39.417..306.678 rows=168 loops=1)

  • Filter: ((subordertable.subordermodeofpayment <> 'onlinepayment'::text) OR (paymenttable.paymentgatewaystatus = 'success'::text))
8. 306.483 306.483 ↑ 5.9 168 1

Index Scan Backward using idx_orderid_subordertable on subordertable (cost=0.43..2,336,811.88 rows=993 width=110) (actual time=39.394..306.483 rows=168 loops=1)

  • Filter: ((parentstoreid IS NOT NULL) AND (storeid = 654,366) AND (suborderstatusvalue = ANY ('{3,5,6,7,8}'::bigint[])))
  • Rows Removed by Filter: 375,257
9. 0.000 0.000 ↓ 0.0 0 168

Index Scan using paymenttable_pkey on paymenttable (cost=0.42..8.03 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=168)

  • Index Cond: (subordertable.suborderpaymentid = paymentid)
10. 0.504 0.504 ↑ 1.0 1 168

Index Scan using shipmenttable_pkey on shipmenttable (cost=0.43..8.28 rows=1 width=47) (actual time=0.003..0.003 rows=1 loops=168)

  • Index Cond: (subordertable.subordershipmentid = shipmentid)
11. 0.036 0.036 ↑ 1.0 1 6

Index Scan using ordertable_pkey on ordertable (cost=0.43..8.29 rows=1 width=29) (actual time=0.006..0.006 rows=1 loops=6)

  • Index Cond: (orderid = subordertable.orderid)
12. 0.011 0.018 ↑ 1.1 8 6

Materialize (cost=0.00..1.14 rows=9 width=36) (actual time=0.002..0.003 rows=8 loops=6)

13. 0.007 0.007 ↑ 1.0 9 1

Seq Scan on convertortable (cost=0.00..1.09 rows=9 width=36) (actual time=0.005..0.007 rows=9 loops=1)

14. 0.042 0.042 ↑ 1.0 1 6

Index Scan using producttable_pkey on producttable (cost=0.57..8.59 rows=1 width=44) (actual time=0.007..0.007 rows=1 loops=6)

  • Index Cond: (productid = subordertable.productid)
Planning time : 3.708 ms
Execution time : 307.726 ms