Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Creating Indexes

Author  Topic 

jwells
Starting Member

17 Posts

Posted - 2013-08-29 : 17:58:34
For large databases is it a good idea to create indexes for fields that are used in Where statements? Does that improve performance and reduce overhead?

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2013-08-29 : 18:12:17
Indexes are intended to improve perfromance when extracting data. They come with the overhead of making inserts and updates more expensive perfromance-wise since the indexes must be modified with the data changes. Indexes also take up more disk space. The choice of which indexes to add is tied to the joins and where clauses but the only true way to know if they are useful is to implement them and see if they actually get used and improve performance.

=================================================
The cure for anything is salt water -- sweat, tears, or the sea. -Isak Dinesen
Go to Top of Page

jwells
Starting Member

17 Posts

Posted - 2013-08-29 : 18:20:07
I guess that if the queries seem to be running quickly it should be ok without indexes. If I encounter long waits on a query I assume it may be a good idea to use indexes?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-08-30 : 00:11:27
yep..it also depends on how frequently query is executed. even if its a time consuming one, if its run infrequently, it probably doesnt make sense to add an index for that. you've to weigh the balance between addition of index and advantage that it gives before you decide on creating it

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

jwells
Starting Member

17 Posts

Posted - 2013-08-30 : 10:49:28
Thanks.
Go to Top of Page
   

- Advertisement -