Click here to monitor SSC
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
Grasshopper
Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)

Group: General Forum Members
Points: 22 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
SSCertifiable
SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)

Group: General Forum Members
Points: 7001 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
SSCertifiable
SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)

Group: General Forum Members
Points: 6697 Visits: 17693
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
SSCertifiable
SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)

Group: General Forum Members
Points: 7001 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-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21075 Visits: 18259
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

GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47235 Visits: 44375
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


TomThomson
TomThomson
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10704 Visits: 12002
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
SSCertifiable
SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)

Group: General Forum Members
Points: 7001 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
Grasshopper
Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)

Group: General Forum Members
Points: 16 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
SSCoach
SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)

Group: General Forum Members
Points: 17580 Visits: 32260
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