Re: Indexes

From: Joachim Pense <>
Date: Sat, 13 Jun 2009 09:32:39 +0200
Message-ID: <h0vkbo$ksf$01$>

The Magnet (in

> My misunderstanding is that when you create a primary or unique key,
> the index is created automatically. So, why when you drop the
> constraint does the index not go with it? Or the other way?

The behaviour makes sense to me. If you drop an index you might be unaware that there's a constraint attached to it. If you drop a constraint, you might still keep the index to support query performance. If you create a constraint, the index is needed. If the DBMS required the index to pre-exist, you could not put the "primary key" clause into the create table statement.

Joachim Received on Sat Jun 13 2009 - 02:32:39 CDT

Original text of this message