MySQL query for one result
Pretty straightforward question: is it more efficient to query a database table and sea开发者_Go百科rch potentially tens of thousands of entries for the one matching result, or create another new table for that 1 result?
SELECT n FROM x WHERE b = 1
OR SELECT * from y
?
If you have your field b
indexed and its cardinality is high - then first query will be enough efficient.
精彩评论