SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


indexing a table having million of records


indexing a table having million of records

Author
Message
raj.prabhu001
raj.prabhu001
Old Hand
Old Hand (338 reputation)Old Hand (338 reputation)Old Hand (338 reputation)Old Hand (338 reputation)Old Hand (338 reputation)Old Hand (338 reputation)Old Hand (338 reputation)Old Hand (338 reputation)

Group: General Forum Members
Points: 338 Visits: 115
Hello,

I have a fact table which has six field now and I have created non clustered index on all fields.

It will also have more fields later with millions of records .

Please suggest me my indexing will help on this table or should I create index in some other way to optimise performance .

Thanks
LutzM
LutzM
SSC Guru
SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)

Group: General Forum Members
Points: 56387 Visits: 13559
after a semi-internal discussion the answer we agreed on is:

Yes.

If you need a more detailed answer please provide a more detailed question.



Lutz
A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
Eirikur Eiriksson
Eirikur Eiriksson
SSC Guru
SSC Guru (94K reputation)SSC Guru (94K reputation)SSC Guru (94K reputation)SSC Guru (94K reputation)SSC Guru (94K reputation)SSC Guru (94K reputation)SSC Guru (94K reputation)SSC Guru (94K reputation)

Group: General Forum Members
Points: 94083 Visits: 20678
LutzM (8/3/2014)
after a semi-internal discussion the answer we agreed on is:

Yes.

If you need a more detailed answer please provide a more detailed question.


Seriously? I thought that this time it was 43
Cool
LutzM
LutzM
SSC Guru
SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)

Group: General Forum Members
Points: 56387 Visits: 13559
To be a little more serious:
To add an index depends if there are queries that'll benefit from it.
Adding an index with all columns just because of adding the index doesn't make much sense.
Without knowing much more details it's hard to tell if the index is approriate.
My wild guess would be: No. But that might be wrong...



Lutz
A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (144K reputation)SSC Guru (144K reputation)SSC Guru (144K reputation)SSC Guru (144K reputation)SSC Guru (144K reputation)SSC Guru (144K reputation)SSC Guru (144K reputation)SSC Guru (144K reputation)

Group: General Forum Members
Points: 144731 Visits: 18651
raj.prabhu001 (8/3/2014)
Hello,

I have a fact table which has six field now and I have created non clustered index on all fields.

It will also have more fields later with millions of records .

Please suggest me my indexing will help on this table or should I create index in some other way to optimise performance .

Thanks


Can you provide execution plan, query statistics and sample queries?

These are the kinds of things that are required to make tuning suggestions.

Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Learn Extended Events

GilaMonster
GilaMonster
SSC Guru
SSC Guru (550K reputation)SSC Guru (550K reputation)SSC Guru (550K reputation)SSC Guru (550K reputation)SSC Guru (550K reputation)SSC Guru (550K reputation)SSC Guru (550K reputation)SSC Guru (550K reputation)

Group: General Forum Members
Points: 550963 Visits: 47744
raj.prabhu001 (8/3/2014)
I have a fact table which has six field now and I have created non clustered index on all fields.

It will also have more fields later with millions of records .


Pretty small table, in other words.

Please suggest me my indexing will help on this table or should I create index in some other way to optimise performance .


Yes, indexes will probably help, you'd design indexes same way you would for other smallish tables or large tables: based on the queries which run against them.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Tom Thomson
Tom Thomson
SSC Guru
SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)

Group: General Forum Members
Points: 50764 Visits: 13159
LutzM (8/3/2014)
after a semi-internal discussion the answer we agreed on is:

Yes.

If you need a more detailed answer please provide a more detailed question.

That's a badlypossibly flawed answer. The correct A better answer is "Probably". Another better answerpossibly correct answer is "Perhaps". It is probablepossible that the best answer is "It depends" or something similar.

Tom

LutzM
LutzM
SSC Guru
SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)

Group: General Forum Members
Points: 56387 Visits: 13559
@Tom:
My answer (Yes) is based on the "question":
...my indexing will help on this table or should I create index in some other way to optimise performance...

which is close to "it depends" from my point of view.
But at a second glance I realize that the option "no indexes at all" would have been ruled out.

Therefore, I accept your answer as being more appropriate.



Lutz
A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
TEJABI
TEJABI
SSC-Enthusiastic
SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)

Group: General Forum Members
Points: 174 Visits: 168
Are u really need index for all columns?. if u not needed for columns ,remove that columns then get improvement .

if u needed all columns then go for covered index .
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)

Group: General Forum Members
Points: 222361 Visits: 33564
raj.prabhu001 (8/3/2014)
Hello,

I have a fact table which has six field now and I have created non clustered index on all fields.

It will also have more fields later with millions of records .

Please suggest me my indexing will help on this table or should I create index in some other way to optimise performance .

Thanks


Determining which indexes are going to be of use is primarily done by understanding the queries that are going to be run against the data. You can't do one without the other. But, the most important decision you have to make is where to place the clustered index. Take your time to understand both your storage needs and your query needs. Generally, the best place to put the clustered index is on the most common access path to the data. This can be the primary key, but it won't necessarily be so.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search