troubleshooting Question

How do I speed up this PDO query

Avatar of lawrence_dev
lawrence_dev asked on
PHPSQL
4 Comments1 Solution217 ViewsLast Modified:
I have indexed the SKU column in both DB tables.  How do I speed this query up?   (There are 20,000+ records in table "Download")

I was using WHERE NOT IN and thought I could speed it up some  by using a LEFT JOIN and IS NULL.

Thanks for your help!!

$query1 = $conn->query('SELECT DISTINCT `Download`.SKU FROM `Download` LEFT JOIN MissingDescriptions ON `Download`.SKU = MissingDescriptions.SKU WHERE MissingDescriptions.SKU IS NULL');
ASKER CERTIFIED SOLUTION
Mukesh Yadav
Full Stack Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer 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 1 Answer 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