to create index

  • 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.

  • 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.

  • But If talk about join then common column should be indexed always.

    Its right isn't? whether the table contain data or not.

  • What you mean by common column??

  • Are you referring to foreign keys? Then the answer would generally be yes.

  • 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