I'm playing around with a PHP/MySQL. I can't devise what is "better" and why ?
This isn't really a direct technical question but more of a efficiency related question.
I'm trying to pull 1 row from a table, this is the general code:
$query=mysqli_query($con,"SELECT * FROM `tracked_sites` WHERE checkType =1");
while ($row = mysqli_fetch_assoc($query)) {
echo $row["domain"] . "<br/>";
}
This works and everything is just fine, however I could also do it using a more specific query, instead of using wildcard. I could just specify the domain and it would trim down the results to just that row.
I'm trying to understand what would be the impact (if any) on larger dbs (lets say 10M or 100M items)?