explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6z8V9

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=164.31..2,709.39 rows=283 width=196) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=164.31..2,706.56 rows=283 width=196) (actual rows= loops=)

3.          

CTE styletypebyworkflowperm

4. 0.000 0.000 ↓ 0.0

Hash Join (cost=2.41..15.09 rows=30 width=80) (actual rows= loops=)

  • Hash Cond: (perm_1.producttypeid = st_1.styletypeid)
5. 0.000 0.000 ↓ 0.0

Function Scan on fnx_permissions_getintproducttype_workflowpermissions perm_1 (cost=0.28..10.28 rows=1,000 width=80) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Hash (cost=2.06..2.06 rows=6 width=4) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Seq Scan on pstyletype st_1 (cost=0.00..2.06 rows=6 width=4) (actual rows= loops=)

8.          

CTE locking

9. 0.000 0.000 ↓ 0.0

Limit (cost=0.25..0.26 rows=1 width=4) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Function Scan on fnx_getappsetting_boolean2num config (cost=0.25..0.26 rows=1 width=4) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=148.96..2,681.30 rows=283 width=204) (actual rows= loops=)

  • Join Filter: ((m.isseasonal = 0) OR ((m.isseasonal = 1) AND (sw.styleseasonyearid = ssy.styleseasonyearid)))
12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=148.54..2,559.73 rows=268 width=218) (actual rows= loops=)

  • Join Filter: (m.map = sw.workflowid)
13. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=148.12..2,004.19 rows=163 width=139) (actual rows= loops=)

  • Join Filter: ((s.statusname)::text = (sh.customfield3)::text)
14. 0.000 0.000 ↓ 0.0

Nested Loop (cost=148.12..1,985.99 rows=163 width=146) (actual rows= loops=)

  • Join Filter: (wti.workflowtemplateid = sh.styleworkflowid)
15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.04..16.43 rows=1 width=108) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.90..15.69 rows=1 width=77) (actual rows= loops=)

  • Join Filter: (perm.producttypeid = st.styletypeid)
17. 0.000 0.000 ↓ 0.0

Merge Join (cost=0.90..13.43 rows=2 width=60) (actual rows= loops=)

  • Merge Cond: (wti.workflowid = perm.workflowid)
18. 0.000 0.000 ↓ 0.0

Index Scan using ix_pworkflowtemplateitem_workflowid on pworkflowtemplateitem wti (cost=0.14..12.57 rows=29 width=32) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Sort (cost=0.76..0.77 rows=2 width=28) (actual rows= loops=)

  • Sort Key: perm.workflowid
20. 0.000 0.000 ↓ 0.0

CTE Scan on styletypebyworkflowperm perm (cost=0.00..0.75 rows=2 width=28) (actual rows= loops=)

  • Filter: ((permissionroleid = 3) OR (permissionview = 1))
21. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..2.09 rows=6 width=17) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Seq Scan on pstyletype st (cost=0.00..2.06 rows=6 width=17) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Index Scan using pk__mmapping__7b9b496d on mapping m (cost=0.14..0.71 rows=1 width=31) (actual rows= loops=)

  • Index Cond: (map = wti.workflowid)
  • Filter: ((isseasonal = 0) OR (isseasonal = 1))
24. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pstyleheader sh (cost=147.08..1,810.21 rows=12,748 width=78) (actual rows= loops=)

  • Recheck Cond: (styletype = st.styletypeid)
25. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ix_pstyleheader_styletype (cost=0.00..143.90 rows=12,748 width=0) (actual rows= loops=)

  • Index Cond: (styletype = st.styletypeid)
26. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1.11 rows=7 width=17) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Seq Scan on pstatus s (cost=0.00..1.07 rows=7 width=17) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Index Scan using ix_pstyleworkflow_styleid on pstyleworkflow sw (cost=0.42..3.17 rows=19 width=111) (actual rows= loops=)

  • Index Cond: (styleid = sh.styleid)
29. 0.000 0.000 ↓ 0.0

Index Scan using ix_pstyleseasonyear_styleid_seasonyearid on pstyleseasonyear ssy (cost=0.41..0.44 rows=1 width=54) (actual rows= loops=)

  • Index Cond: (styleid = sw.styleid)
30. 0.000 0.000 ↓ 0.0

CTE Scan on locking (cost=0.00..0.02 rows=1 width=4) (actual rows= loops=)