I am asking this by curiosity. This could be the most stupid question or basic question. Forgive me if it is..
Suppose I have a isThatA table contains id, class, school_id having 1000 records.
there are 3 schools and 12 classes.
Which of these 2 queries would be faster(if there is a difference)
Query 1: SELECT * FROM isThatA WHERE school=2 and class=5;
Query 2: SELECT * FROM isThatA WHERE class=5 and school=2;
Note: I just changed the places of the 2 conditions in WHERE
Also probable number of records for condition WHERE school=2 is 333
and probable number of records for condition WHERE class=5 is 80.
|
My Blog Title
|