Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 24th, 2004, 11:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Default Indexing.

I have a vary large table that runs slower than cold tar. Are indexes the way to go? It is mostly slow on pulling data. How often should I run them? Data is inserted into the table all the time (some have up to 100 rows added a day and others may have 1000 a day). Do I create indexes for all the fields I search from?

Chris
__________________
Chris
  #2 (permalink)  
Old May 24th, 2004, 12:32 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Indexes are the way to go because it only searches through 4 levels instead of the entire table. You want to add indexes to fields like phone numbers. You don't want to index a city unless there a a good number of cities ie. if everyone was from New York it would be pointless.

If I'm not mistaken, SQL Server will update the indexes automatically when records change.
  #3 (permalink)  
Old May 24th, 2004, 01:27 PM
Registered User
 
Join Date: Apr 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to aousterhout
Default

Yes. You should create indices that match your table relationships and your look-up search criteria with an eye on not over-indexing. Your database may provide reports or indexing suggestions. Think also about clustering that physically arranges the records in the index order.

Andy

  #4 (permalink)  
Old May 24th, 2004, 03:14 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cairo, , Egypt.
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

try to collect queries running on that table and use the index tuning tool to get you the best set for indicies..

Ahmed Ali
Software Developer


Similar Threads
Thread Thread Starter Forum Replies Last Post
CANNOT APPLY INDEXING WITH [] pallone .NET Framework 2.0 7 April 8th, 2008 06:40 AM
Class Indexing ~Bean~ ASP.NET 1.x and 2.0 Application Design 2 August 16th, 2005 06:28 AM
indexing within grouping jkmyoung XSLT 3 November 15th, 2004 04:08 PM
indexing vohra_vikas SQL Server 2000 2 September 28th, 2004 11:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.