|
-
Jun 26th, 2000, 12:05 PM
#7
Hyperactive Member
If you want to make the statement as fast as possible you have to make sure that the fields that are linked between the tables are in fact primary keys.
What this does is allows you to link on these keys instead of having to "tablescan". You would find this out if you did any query planning for the SQL Statement.
If you are using something like ADO, and you know that the only values you are returning from the query are PART of the primary keys the you can use the "adKeySet" which will make the statement faster because it doesn't go to the actual tables to get the data but instead pulls them straight from the Indexes saving itself the time to have to then reference the table afterwards... but this is rare.
If you are using SQL Server 6.5 then I would go to the ISQL window and change the option to produce a query plan... then run the query and look to see if you find the word "tablescan". If you do then it could be made quicker with a few indexes :-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|