Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Is this true?
Sun, Jan 10 2010 1:50 AMPermanent Link

"Lucian Radulescu"
Hi,

If you have a field in a table, which has a constraint and also there
is an index using that field ... if you than want to drop that field,
you have to do this:

ALTER TABLE DROP CONSTRAINT;
DROP INDEX ON TABLE;
ALTER TABLE DROP COLUMN;

It bothers me you have to alter the table twice. What if the table is
big? Can we have ALTER TABLE also DROP INDEX? Than I could have
ALTER TABLE DROP CONSTRAINT, DROP INDEX, DROP COLUMN;
(laugh all you want if I'm saying something really stupid)


regards,
Lucian
Mon, Jan 11 2010 12:04 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Lucian,

<< If you have a field in a table, which has a constraint and also there is
an index using that field ... if you than want to drop that field, you have
to do this:

ALTER TABLE DROP CONSTRAINT;
DROP INDEX ON TABLE;
ALTER TABLE DROP COLUMN;

It bothers me you have to alter the table twice. What if the table is big?
Can we have ALTER TABLE also DROP INDEX? Than I could have ALTER TABLE DROP
CONSTRAINT, DROP INDEX, DROP COLUMN; (laugh all you want if I'm saying
something really stupid) >>

Indexes and constraints are two different things in ElevateDB.  To do the
above, you would use the following:

DROP INDEX ON TABLE;

ALTER TABLE DROP CONSTRAINT,
DROP COLUMN;

Just the two operations are required.  Also, the DROP INDEX is very fast in
ElevateDB.  All it has to do is free the index pages used by the index.

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Jan 11 2010 12:20 PMPermanent Link

"Lucian Radulescu"
> Indexes and constraints are two different things in ElevateDB.

Thanks, now I understand.



> To do the above, you would use the following:


Cool, thx a lot,
Lucian
Image