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
SSC-Enthusiastic
SSC-Enthusiastic (130 reputation)SSC-Enthusiastic (130 reputation)SSC-Enthusiastic (130 reputation)SSC-Enthusiastic (130 reputation)SSC-Enthusiastic (130 reputation)SSC-Enthusiastic (130 reputation)SSC-Enthusiastic (130 reputation)SSC-Enthusiastic (130 reputation)

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

Group: General Forum Members
Points: 24541 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-Forever
SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)

Group: General Forum Members
Points: 41956 Visits: 19520
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-Insane
SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)

Group: General Forum Members
Points: 24541 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 (68K reputation)SSC Guru (68K reputation)SSC Guru (68K reputation)SSC Guru (68K reputation)SSC Guru (68K reputation)SSC Guru (68K reputation)SSC Guru (68K reputation)SSC Guru (68K reputation)

Group: General Forum Members
Points: 68623 Visits: 18570
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 Guru
SSC Guru (233K reputation)SSC Guru (233K reputation)SSC Guru (233K reputation)SSC Guru (233K reputation)SSC Guru (233K reputation)SSC Guru (233K reputation)SSC Guru (233K reputation)SSC Guru (233K reputation)

Group: General Forum Members
Points: 233035 Visits: 46361
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
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26443 Visits: 12506
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-Insane
SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)

Group: General Forum Members
Points: 24541 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
Valued Member
Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)

Group: General Forum Members
Points: 58 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 (100K reputation)SSC Guru (100K reputation)SSC Guru (100K reputation)SSC Guru (100K reputation)SSC Guru (100K reputation)SSC Guru (100K reputation)SSC Guru (100K reputation)SSC Guru (100K reputation)

Group: General Forum Members
Points: 100987 Visits: 33014
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