[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.sqlserver.programming

Does this index make sense?

(jim corey)

3/1/2007 1:46:00 PM

We have a dimension table in star schema that has only 7 rows. The
possibility that it will grow more than a row or two is extremely
unlikely.

We have a primary key on the generated key number, and a clustered
index on
what would be called the natural key.

Is there any point to having an index on a table this small? I'm
guessing it doesn't matter one way or the other. It will typically be
used in a join with two or three other dimesion tables and a fact
table.

2 Answers

Jason Lepack

3/1/2007 1:52:00 PM

0

Here's the thing. An index of those parts won't take up much disc
space, so it won't really hurt you to create it. Also, all that
matters is what QueryAnalyzer thinks. Create the index and see if
QueryAnalyzer uses it once you've got "real" data loading your
database.

Cheers,
Jason Lepack

On Mar 1, 8:45 am, "cowznofsky" <jhco...@yahoo.com> wrote:
> We have a dimension table in star schema that has only 7 rows. The
> possibility that it will grow more than a row or two is extremely
> unlikely.
>
> We have a primary key on the generated key number, and a clustered
> index on
> what would be called the natural key.
>
> Is there any point to having an index on a table this small? I'm
> guessing it doesn't matter one way or the other. It will typically be
> used in a join with two or three other dimesion tables and a fact
> table.


Uri Dimant

3/1/2007 2:00:00 PM

0

Well if the table is small , it will be easy for SQL Server to scan it
rather than navigate thru index page to the value






"cowznofsky" <jhcorey@yahoo.com> wrote in message
news:1172756740.266463.236950@j27g2000cwj.googlegroups.com...
> We have a dimension table in star schema that has only 7 rows. The
> possibility that it will grow more than a row or two is extremely
> unlikely.
>
> We have a primary key on the generated key number, and a clustered
> index on
> what would be called the natural key.
>
> Is there any point to having an index on a table this small? I'm
> guessing it doesn't matter one way or the other. It will typically be
> used in a join with two or three other dimesion tables and a fact
> table.
>