explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lThp

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.039 ↓ 0.0 0 1

WindowAgg (cost=525,585.89..525,596.55 rows=533 width=297) (actual time=0.039..0.039 rows=0 loops=1)

2.          

CTE foo

3. 0.001 0.032 ↓ 0.0 0 1

GroupAggregate (cost=525,367.21..525,551.09 rows=533 width=289) (actual time=0.032..0.032 rows=0 loops=1)

  • Group Key: collegeteammemberinfotable.storeid
4. 0.006 0.031 ↓ 0.0 0 1

Sort (cost=525,367.21..525,368.54 rows=533 width=135) (actual time=0.031..0.031 rows=0 loops=1)

  • Sort Key: collegeteammemberinfotable.storeid
  • Sort Method: quicksort Memory: 25kB
5. 0.000 0.025 ↓ 0.0 0 1

Hash Join (cost=29.04..525,343.07 rows=533 width=135) (actual time=0.025..0.025 rows=0 loops=1)

  • Hash Cond: (collegeteammemberinfotable.teamnumber = collegeteaminfotable.teamnumber)
6. 0.001 0.025 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.16..525,314.78 rows=533 width=103) (actual time=0.025..0.025 rows=0 loops=1)

7. 0.000 0.024 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.73..522,726.58 rows=533 width=99) (actual time=0.024..0.024 rows=0 loops=1)

  • Filter: ((subordertable.subordermodeofpayment = 'cod'::text) OR (paymenttable.paymentgatewaystatus = 'success'::text))
8. 0.000 0.024 ↓ 0.0 0 1

Nested Loop (cost=1.30..519,765.42 rows=617 width=99) (actual time=0.024..0.024 rows=0 loops=1)

9. 0.001 0.024 ↓ 0.0 0 1

Nested Loop (cost=0.87..515,316.19 rows=916 width=107) (actual time=0.024..0.024 rows=0 loops=1)

  • Join Filter: (collegeteammemberinfotable.storeid = subordertable.storeid)
10. 0.004 0.017 ↑ 1,060.0 1 1

Nested Loop (cost=0.43..8,869.60 rows=1,060 width=69) (actual time=0.016..0.017 rows=1 loops=1)

11. 0.006 0.006 ↑ 1,060.0 1 1

Seq Scan on collegeteammemberinfotable (cost=0.00..20.60 rows=1,060 width=49) (actual time=0.006..0.006 rows=1 loops=1)

12. 0.007 0.007 ↑ 1.0 1 1

Index Scan using storetable_pkey on storetable (cost=0.43..8.35 rows=1 width=20) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (storeid = collegeteammemberinfotable.storeid)
13. 0.006 0.006 ↓ 0.0 0 1

Index Scan using idx_storeid_subordertable on subordertable (cost=0.43..474.85 rows=234 width=54) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: (storeid = storetable.storeid)
  • Filter: (parentstoreid IS NOT NULL)
14. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_suborderid_subordertableforresellers on subordertableforresellers (cost=0.43..4.85 rows=1 width=8) (never executed)

  • Index Cond: (suborderid = subordertable.suborderid)
  • Heap Fetches: 0
15. 0.000 0.000 ↓ 0.0 0

Index Scan using paymenttable_pkey on paymenttable (cost=0.43..4.78 rows=1 width=16) (never executed)

  • Index Cond: (subordertable.suborderpaymentid = paymentid)
16. 0.000 0.000 ↓ 0.0 0

Index Scan using shipmenttable_pkey on shipmenttable (cost=0.43..4.86 rows=1 width=20) (never executed)

  • Index Cond: (subordertable.subordershipmentid = shipmentid)
17. 0.000 0.000 ↓ 0.0 0

Hash (cost=17.50..17.50 rows=750 width=40) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Seq Scan on collegeteaminfotable (cost=0.00..17.50 rows=750 width=40) (never executed)

19. 0.004 0.037 ↓ 0.0 0 1

Sort (cost=34.80..36.13 rows=533 width=289) (actual time=0.037..0.037 rows=0 loops=1)

  • Sort Key: foo.totalpoints DESC, foo.mintimestamp
  • Sort Method: quicksort Memory: 25kB
20. 0.033 0.033 ↓ 0.0 0 1

CTE Scan on foo (cost=0.00..10.66 rows=533 width=289) (actual time=0.033..0.033 rows=0 loops=1)

Planning time : 3.613 ms
Execution time : 0.273 ms