troubleshooting Question

How to rewrite this correlated subquery using joins

Avatar of Surya M
Surya M asked on
Microsoft SQL Server
4 Comments3 Solutions50 ViewsLast Modified:
How to rewrite this correlated subquery using joins . This query is taking more time to execute. i want to reduce the execution time.

SELECT n.*, m.ext_id, m.version, m.cust_id, m.prd_id
FROM ext_pln n, ext_plc_ver m
WHERE m.ext_pln_id = n.ext_pln_id
AND m.plcy_version = (SELECT max(plcy_version) FROM ext_plc_ver WHERE EXTN_CD = m.EXTN_CD)
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 3 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros