explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pUrj

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

Limit (cost=2,298.92..2,298.94 rows=1 width=475) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Subquery Scan on temp (cost=2,298.92..2,298.94 rows=1 width=475) (actual rows= loops=)

  • Filter: (temp.rowrank = 1)
3. 0.000 0.000 ↓ 0.0

Sort (cost=2,298.92..2,298.92 rows=1 width=475) (actual rows= loops=)

  • Sort Key: uipriority.prioritisedscore DESC
4. 0.000 0.000 ↓ 0.0

WindowAgg (cost=2,298.89..2,298.91 rows=1 width=475) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Sort (cost=2,298.89..2,298.89 rows=1 width=463) (actual rows= loops=)

  • Sort Key: c.customerid, uipriority.prioritisedscore DESC
6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=925.70..2,298.88 rows=1 width=463) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=925.55..2,298.61 rows=1 width=467) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=925.13..2,298.02 rows=1 width=459) (actual rows= loops=)

  • Join Filter: (c.customertypeid = ct.customertypeid)
9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=925.13..2,296.97 rows=1 width=435) (actual rows= loops=)

  • Join Filter: (ia.entitytypeid = et.entitytypeid)
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=925.13..2,295.94 rows=1 width=443) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=924.72..2,295.21 rows=1 width=146) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=924.30..2,294.20 rows=2 width=154) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=923.88..2,293.53 rows=1 width=130) (actual rows= loops=)

  • Join Filter: (uipriority.insightid = insights.insightid)
14. 0.000 0.000 ↓ 0.0

Nested Loop (cost=923.46..2,290.16 rows=4 width=58) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Hash Join (cost=923.05..2,264.52 rows=4 width=34) (actual rows= loops=)

  • Hash Cond: (uipriority.insightid = uipreference.insightid)
16. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on userinsightpriority uipriority (cost=21.49..1,361.24 rows=654 width=21) (actual rows= loops=)

  • Recheck Cond: (userid = 1,243)
  • Filter: (isdeleted = 0)
17. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on userinsightpriority_userid_idx (cost=0.00..21.32 rows=654 width=0) (actual rows= loops=)

  • Index Cond: (userid = 1,243)
18. 0.000 0.000 ↓ 0.0

Hash (cost=893.92..893.92 rows=611 width=13) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on userinsightpreference uipreference (cost=21.22..893.92 rows=611 width=13) (actual rows= loops=)

  • Recheck Cond: (userid = 1,243)
  • Filter: (status = 0)
20. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on userinsightpreference_userid_insightid_idx (cost=0.00..21.07 rows=620 width=0) (actual rows= loops=)

  • Index Cond: (userid = 1,243)
21. 0.000 0.000 ↓ 0.0

Index Scan using insightassociations_insightid_idx on insightassociations ia (cost=0.42..6.40 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (insightid = uipriority.insightid)
  • Filter: (isdeleted = 0)
22. 0.000 0.000 ↓ 0.0

Index Scan using pk_insights_insightid on insights (cost=0.42..0.83 rows=1 width=96) (actual rows= loops=)

  • Index Cond: (insightid = ia.insightid)
  • Filter: ((isdeleted = 0) AND (insighttype = 1) AND (expirydate >= CURRENT_TIMESTAMP))
23. 0.000 0.000 ↓ 0.0

Index Scan using alignments_customerid_idx on alignments a (cost=0.42..0.65 rows=2 width=24) (actual rows= loops=)

  • Index Cond: (customerid = ia.entityid)
24. 0.000 0.000 ↓ 0.0

Index Only Scan using oisocv_userid_salesforceid_orgunitid_idx on orgunitidsfromuserspanofcontrol_view y (cost=0.42..0.49 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((userid = 1,243) AND (salesforceid = a.salesforceid) AND (orgunitid = a.orgunitid))
25. 0.000 0.000 ↓ 0.0

Index Scan using pk_customers_customerid on customers c (cost=0.42..0.73 rows=1 width=313) (actual rows= loops=)

  • Index Cond: (customerid = ia.entityid)
  • Filter: (isdeleted = 0)
26. 0.000 0.000 ↓ 0.0

Seq Scan on entitytypes et (cost=0.00..1.02 rows=1 width=4) (actual rows= loops=)

  • Filter: ((isdeleted = 0) AND (lower(type) = 'customer'::text))
27. 0.000 0.000 ↓ 0.0

Seq Scan on customertype ct (cost=0.00..1.04 rows=1 width=40) (actual rows= loops=)

  • Filter: (isdeleted = 0)
28. 0.000 0.000 ↓ 0.0

Index Scan using customersegment_customerid_isdeleted_productid_idx on customersegment cs (cost=0.41..0.58 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((c.customerid = customerid) AND (isdeleted = 0) AND (productid IS NULL))
29. 0.000 0.000 ↓ 0.0

Index Scan using highvaluehcpconfiguration_segmentvalueid_idx on highvaluehcpconfiguration (cost=0.15..0.25 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (cs.segmentvalueid = segmentvalueid)