Is it possible to use a For Each statement on this query to conserve server memory? If yes, How do I add the For Each statement to this query?
The primary download has over 100,000 records. The options table has over 100,000 records. My server has 16GB of Ram but this left join uses about 9GB of RAM. I am joining Sku and ParentSku columns.
$query1 = $conn->query('SELECT * FROM `download`
LEFT JOIN `options`
while ($row1 = $query1->fetch(PDO::FETCH_ASSOC))
echo $row1['ProductName']." ".$row1['Choice']."<BR>";