Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

indexing a table having million of records Expand / Collapse
Author
Message
Posted Sunday, August 3, 2014 8:02 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, October 9, 2014 2:07 PM
Points: 17, Visits: 82
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
Post #1599044
Posted Sunday, August 3, 2014 8:12 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:49 AM
Points: 6,842, Visits: 13,374
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
Post #1599047
Posted Sunday, August 3, 2014 8:25 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 12:26 AM
Points: 2,532, Visits: 7,090
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
Post #1599049
Posted Sunday, August 3, 2014 8:38 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:49 AM
Points: 6,842, Visits: 13,374
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
Post #1599050
Posted Sunday, August 3, 2014 9:35 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 3:20 PM
Points: 18,064, Visits: 16,099
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
Post #1599052
Posted Sunday, August 3, 2014 10:06 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 8:36 AM
Points: 40,615, Visits: 37,080
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 2008, MVP
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

Post #1599059
Posted Sunday, August 3, 2014 5:04 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 5:50 PM
Points: 7,923, Visits: 9,649
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
Post #1599078
Posted Sunday, August 3, 2014 5:47 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:49 AM
Points: 6,842, Visits: 13,374
@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
Post #1599081
Posted Monday, August 4, 2014 3:19 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, August 21, 2014 3:10 AM
Points: 9, Visits: 68
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 .
Post #1599166
Posted Monday, August 4, 2014 4:58 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 8:22 AM
Points: 14,205, Visits: 28,534
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
Post #1599196
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse