Hey Guys, I am doing a social networking site that requires a good bit of queries. I am using 1 query that has a IN() function in it. I am wondering if this requires a full DB scan. I am not sure of any other way to get the same results.
Example Table:
ID | NAME | AGE
05 | Quinton | 25
22 | Stevey | 33
78 | Rebecca | 22
90 | Michael | 26
Query: "SELECT * FROM users WHERE id IN(05,78) ORDER BY id DESC LIMIT 0,2"
Is this the most efficient way to get a list of users that are in a array? (using PHP)