sql statements
Posted: Fri Jan 31, 2003 11:51 am
hi,
i am fairly new to mysql. can someone please point me in the right direction?
i have an SQL statement that queries multiple tables. does it matter how order the clauses in the where statement. i want the query to be as fast as possible.
here is an example:
SELECT Team.TeamName, Club.ClubName
FROM Team, Club
WHERE Team.TeamID = $TeamID and
Team.ClubID = Club.ClubID
I have TeamID indexed on the Team table and ClubID indexed on the Club table.
so, would my query be faster if i rearranged the where clause somehow? and if so, how should i rearrange it, please?
thanks so much!
i am fairly new to mysql. can someone please point me in the right direction?
i have an SQL statement that queries multiple tables. does it matter how order the clauses in the where statement. i want the query to be as fast as possible.
here is an example:
SELECT Team.TeamName, Club.ClubName
FROM Team, Club
WHERE Team.TeamID = $TeamID and
Team.ClubID = Club.ClubID
I have TeamID indexed on the Team table and ClubID indexed on the Club table.
so, would my query be faster if i rearranged the where clause somehow? and if so, how should i rearrange it, please?
thanks so much!