Avatar of lawrence_dev

asked on 

How do I speed up this PDO query

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');

Open in new window


Avatar of undefined
Last Comment

8/22/2022 - Mon