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
 Should I Create Index?

Author  Topic 

MMMY
Starting Member

14 Posts

Posted - 2012-05-31 : 10:22:46
I'm working with a huge, huge data set so I don't want to do anything that I will regret. I am not a DBA by trade so please be understanding. :)

EXAMPLE 1
Columns
A B C

I will never modify A. I will be constantly updating B and C. By indexing A, will that improve performance of my queries that will update B and C involving WHERE clauses for A?


EXAMPLE 2
Columns
A B C

I will never modify A. I will be constantly updating B and C through the use of WHERE clauses for A and WHERE C is null. Should I create an index for A and C?

Thank you so much

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-05-31 : 10:27:43
What exactly is a "huge, huge data set"?
Go to Top of Page

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2012-05-31 : 10:32:36
huge dataset = 1 billion rows
huge, huge dataset = 1 billion billion rows











How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

For ultra basic questions, follow these links.
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-05-31 : 10:34:50
quote:
Originally posted by DonAtWork

huge dataset = 1 billion rows
huge, huge dataset = 1 billion billion rows


I can't keep up with this new math
Go to Top of Page

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2012-05-31 : 10:36:27
Probably index A and possibly include B and C. Might want to cluster on A but maybe not - depends on the queries. Is there a PK?
You need to be careful about page splitting if b and c change in size.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2012-06-01 : 14:59:45
Present the queries, are there any JOINS,ORDER BY etc?

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
   

- Advertisement -