explain.depesz.com

PostgreSQL's explain analyze made readable

Result: d6b5

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 172.588 ↑ 1.0 1 1

Nested Loop Left Join (cost=3.53..10,602.15 rows=1 width=740) (actual time=172.584..172.588 rows=1 loops=1)

  • Join Filter: (wholesalecataloguetable.catalogueid = aggcataloguerating.catalogueid)
2. 0.006 172.571 ↑ 1.0 1 1

Nested Loop Left Join (cost=3.24..10,593.82 rows=1 width=724) (actual time=172.567..172.571 rows=1 loops=1)

  • Join Filter: (wholesalecataloguetable.catalogueid = wholesalecataloguetable_2.catalogueid)
3. 0.003 8.314 ↑ 1.0 1 1

Nested Loop Left Join (cost=2.54..128.91 rows=1 width=660) (actual time=8.311..8.314 rows=1 loops=1)

  • Join Filter: (wholesalecataloguetable.catalogueid = wholesalecataloguetable_1.catalogueid)
4. 0.014 0.014 ↑ 1.0 1 1

Index Scan using wholesalecataloguetable_pkey on wholesalecataloguetable (cost=0.42..8.44 rows=1 width=639) (actual time=0.013..0.014 rows=1 loops=1)

  • Index Cond: (catalogueid = 1823)
5. 0.001 8.297 ↑ 1.0 1 1

Nested Loop (cost=2.12..120.46 rows=1 width=29) (actual time=8.295..8.297 rows=1 loops=1)

6. 0.004 7.436 ↑ 1.0 1 1

GroupAggregate (cost=1.85..112.15 rows=1 width=16) (actual time=7.435..7.436 rows=1 loops=1)

  • Group Key: wholesalecataloguetable_1.catalogueid
7. 0.006 7.432 ↓ 2.3 7 1

Nested Loop (cost=1.85..112.13 rows=3 width=16) (actual time=4.163..7.432 rows=7 loops=1)

8. 0.002 5.417 ↓ 2.3 7 1

Nested Loop (cost=1.41..87.47 rows=3 width=16) (actual time=2.654..5.417 rows=7 loops=1)

9. 0.381 0.381 ↑ 1.0 1 1

Index Only Scan using wholesalecataloguetable_pkey on wholesalecataloguetable wholesalecataloguetable_1 (cost=0.42..8.44 rows=1 width=8) (actual time=0.380..0.381 rows=1 loops=1)

  • Index Cond: (catalogueid = 1823)
  • Heap Fetches: 1
10. 0.003 5.034 ↓ 2.3 7 1

Nested Loop (cost=1.00..79.01 rows=3 width=16) (actual time=2.273..5.034 rows=7 loops=1)

11. 1.174 1.174 ↓ 1.2 7 1

Index Scan using idx_catalogueid_wholesalecatalogueproducttable on wholesalecatalogueproducttable (cost=0.42..27.41 rows=6 width=16) (actual time=1.171..1.174 rows=7 loops=1)

  • Index Cond: (catalogueid = 1823)
12. 3.857 3.857 ↑ 1.0 1 7

Index Scan using producttable_pkey on producttable (cost=0.57..8.59 rows=1 width=16) (actual time=0.551..0.551 rows=1 loops=7)

  • Index Cond: (productid = wholesalecatalogueproducttable.productid)
  • Filter: (productstatus = 'visible'::text)
13. 2.009 2.009 ↑ 1.0 1 7

Index Scan using productcategorytable_pkey on productcategorytable (cost=0.43..8.21 rows=1 width=16) (actual time=0.217..0.287 rows=1 loops=7)

  • Index Cond: (productcategoryid = producttable.productcategoryid)
  • Filter: ((masterproductcategoryid IS NOT NULL) AND (masterproductcategoryid <> 32))
14. 0.860 0.860 ↑ 1.0 1 1

Index Scan using masterproductcategorytable_pkey on masterproductcategorytable (cost=0.27..8.29 rows=1 width=21) (actual time=0.859..0.860 rows=1 loops=1)

  • Index Cond: (masterproductcategoryid = (min(productcategorytable.masterproductcategoryid)))
15. 3.456 164.251 ↑ 1.0 1 1

GroupAggregate (cost=0.70..10,464.88 rows=1 width=32) (actual time=164.251..164.251 rows=1 loops=1)

  • Group Key: wholesalecataloguetable_2.catalogueid
16. 0.011 160.795 ↑ 1.2 30 1

Nested Loop (cost=0.70..10,464.22 rows=37 width=32) (actual time=31.557..160.795 rows=30 loops=1)

17. 0.005 0.005 ↑ 1.0 1 1

Index Scan using wholesalecataloguetable_pkey on wholesalecataloguetable wholesalecataloguetable_2 (cost=0.42..8.44 rows=1 width=16) (actual time=0.004..0.005 rows=1 loops=1)

  • Index Cond: (catalogueid = 1823)
18. 0.033 160.779 ↑ 1.2 30 1

Nested Loop (cost=0.28..10,455.41 rows=37 width=24) (actual time=31.551..160.779 rows=30 loops=1)

19. 156.096 156.096 ↑ 2.1 30 1

Seq Scan on wholesalecollectioncataloguetable (cost=0.00..10,239.88 rows=63 width=24) (actual time=31.145..156.096 rows=30 loops=1)

  • Filter: ((status = 'visible'::text) AND (catalogueid = 1823))
  • Rows Removed by Filter: 458029
20. 4.650 4.650 ↑ 1.0 1 30

Index Scan using wholesalecollectiontable_pkey on wholesalecollectiontable (cost=0.28..3.41 rows=1 width=8) (actual time=0.154..0.155 rows=1 loops=30)

  • Index Cond: (collectionid = wholesalecollectioncataloguetable.collectionid)
  • Filter: (collectionstatus <> 'deleted'::text)
21. 0.008 0.008 ↑ 1.0 1 1

Index Scan using idx_aggcataloguerating_catalogueid on aggcataloguerating (cost=0.29..8.31 rows=1 width=24) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: (catalogueid = 1823)
Planning time : 13.720 ms
Execution time : 172.810 ms