sql - Query optimization in this case -


i asking curiosity. stupid question or basic question. forgive me if is..

suppose have isthata table contains id, class, school_id having 1000 records.

there 3 schools , 12 classes.

which of these 2 queries faster(if there difference)

query 1: select * isthata school=2 , class=5;  query 2: select * isthata class=5 , school=2; 

note: changed places of 2 conditions in where

also probable number of records condition school=2 333

and probable number of records condition class=5 80.

there's no difference there. use explain select ... discover approach mysql choose optimize , run queries. answer question.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -