If I'm querying a table where I know it's going to be a unique answer should I put LIMIT 0,1 . My thinking being that if the record I'm looking for is the 3rd of 250,000 then using LIMIT will stop the query after it's found the record instead of going through the other 249,997 records. Is this right?
$sql = "SELECT * FROM db_sector WHERE sector_x = '" . $x . "' AND sector_y = '" . $y . "' LIMIT 0,1";
$result = mysql_query($sql);
$sector_id = mysql_result($result, "0", "db_sector.sector_id");