Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Indexes

Status
Not open for further replies.

azzazzello

Technical User
Jan 25, 2005
297
US
Probably most people know this, but if someone doesn't this can be very helpful.
Whenever you are doing a JOIN or nested selects, create an INDEX on the field which you are using to crossreference. Even with a few rows, it speeds up the query TREMENDOUSLY. I have 2 tables, one of which had 1000 rows, and the other 3000. A subselect or a JOIN between them took me 58 seconds (and I expect that to increase greatly as more records are added). When I created an index on the field I was using to join them, the query time went down to 0.17 of a second.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top