rolfhsp
15 years ago
Got a simple example table definition:
create table MyTable ( c1 int, c2 char(3), c3 datetime)
alter table MyTable add constraint PK_MyTable primary key
(c1, c2)
create index IX_MyTable1 on MyTable (c1, c2)
Note that I'm creating a non-clustered index on the same
columns as the clustered primary key.
sp_help MyTable gives this for the indexes:
PK_MyTable clustered, unique located on default c1,
c2
IX_MyTable1 nonclustered located on default
c1, c2
However, if I reverse engineer the table in PowerDesigner
and have a look in the table properties/Indexes IX_MyTable1
is now marked as Clustered/Unique/Primary key, and when
generating the SQL the Index is dropped altogether.
This looks like a bug to me.
Even though it could be the case that PowerDesigner figures
out that this index is not needed or considers that it is a
bad idea, it should not falsely claim it is a Clustered
index and drop it.
Best regards,
Rolf Pedersen
create table MyTable ( c1 int, c2 char(3), c3 datetime)
alter table MyTable add constraint PK_MyTable primary key
(c1, c2)
create index IX_MyTable1 on MyTable (c1, c2)
Note that I'm creating a non-clustered index on the same
columns as the clustered primary key.
sp_help MyTable gives this for the indexes:
PK_MyTable clustered, unique located on default c1,
c2
IX_MyTable1 nonclustered located on default
c1, c2
However, if I reverse engineer the table in PowerDesigner
and have a look in the table properties/Indexes IX_MyTable1
is now marked as Clustered/Unique/Primary key, and when
generating the SQL the Index is dropped altogether.
This looks like a bug to me.
Even though it could be the case that PowerDesigner figures
out that this index is not needed or considers that it is a
bad idea, it should not falsely claim it is a Clustered
index and drop it.
Best regards,
Rolf Pedersen