July 22, 2008 at 3:09 am
Hi,
I am working in product based company and I am DBA for this company. I want to know that if a table doesnot contain any record
there is need to create index on a table.
And our developer the query they write does not create
any index except primary key index.And there is no record in table also
without test data.
But how I can come to know the query will work better
without index when long query will be written.
Please suggest me.
July 22, 2008 at 3:15 am
Creating index on a table with no data is waste of time.As you mentioned you have primary keys defined which creates a clustered index on the table.For long queries you have to check the queries and index the columns according to that.
July 22, 2008 at 3:33 am
But If talk about join then common column should be indexed always.
Its right isn't? whether the table contain data or not.
July 29, 2008 at 2:29 am
What you mean by common column??
July 30, 2008 at 7:14 am
Are you referring to foreign keys? Then the answer would generally be yes.
July 31, 2008 at 4:40 pm
A table with no data is a waste of time, so somewhere down the line it will be populated with data.
Now you have a table, with data used from what I can gather for Foreign Constraint evaluation. Now you also need an index.
Pete
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply