Results 1 to 4 of 4
Apr 29, 2004, 04:54 #1
- Join Date
- Mar 2004
- united states
- 0 Post(s)
- 0 Thread(s)
questions regarding MySQL optimizations
Could someone tell me how the following optimizations are handled by MySQL 5.0
It is good practice to place the most limiting conditions in the where clause first. Does MySQL read the conditions top to bottom or bottom to top? Should the most limiting conditions come first after the 'where' or at the end of it?
i.e, which is better in MySQL 5.0?
Where <most limiting> AND <least limiting>
Where <least limiting> AND <most limiting>
I am using like '%xxx%' on a certain column quite frequently. The table that has that column has a lot of data that (most of it is unique). Should I consider placing an index on that column?
If I have 2 tables with data, and an additional table is used to connect them (i.e. table 'Ownership' connects 'people' and 'pets'), does the order of the table in the following where clause matters?
Which will be faster?
People.ID = Ownership.OwnerID AND pets.ID = Ownership.PetID
Ownership.OwnerID = People.ID AND Ownership.PetID = pets.ID
People.ID = Ownership.OwnerID AND Ownership.PetID = pets.ID
Ownership.OwnerID = People.ID AND pets.ID = Ownership.PetID
does the order matter?
thanks in advance