Jump to content

ways to make a query run faster


mauro21pl

Recommended Posts

HiI have two table and three queries. The output of the queries is exactly the same. I am using join, IN and EXIST. Well I will give you the codes of it:Query01SELECT DISTINCT Owner.* FROM Owner, MemberWHERE Owner.userid=Member.userid;Query02SELECT * FROM OwnerWHERE userid IN (SELECT userid FROM Member);Query03SELECT * FROM OwnerWHERE EXISTS (SELECT * FROM Member where Owner.userid = Member.userid);I know I can use index on userid to make it run faster. Are there any other ways to make the query run faster? Could I change anyything in the codes so it will output the same results but with more efficient way making the query run fasterThx

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...