Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread EDBManager moving columns
Sat, Jul 12 2008 8:47 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

I just moved a column using EDBManager and looking at the SQL History a MOVE TO is generated for each up / down move eg

ALTER TABLE "Users"
ALTER COLUMN "_DisplaySettings" MOVE TO 21,
ALTER COLUMN "_DisplaySettings" MOVE TO 20,
ALTER COLUMN "_DisplaySettings" MOVE TO 19,
ALTER COLUMN "_DisplaySettings" MOVE TO 20,
ALTER COLUMN "_DisplaySettings" MOVE TO 21,
ALTER COLUMN "_DisplaySettings" MOVE TO 22

I don't know what happens under the bonnet but unless its sorting it out it looks very ineffective, especially on a big table.

Roy Lambert
Sat, Jul 12 2008 2:15 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I don't know what happens under the bonnet but unless its sorting it out
it looks very ineffective, especially on a big table. >>

Internally, the column moves happen all before any row data is actually
modified.

The table alteration SQL generation has to work like this.  Remember, it has
to track everything you're doing in the exact same order that you're doing
it.

--
Tim Young
Elevate Software
www.elevatesoft.com

Sat, Jul 12 2008 2:48 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

>Internally, the column moves happen all before any row data is actually
>modified.

I was hoping it would be something like that so fairly efficient.

>The table alteration SQL generation has to work like this. Remember, it has
>to track everything you're doing in the exact same order that you're doing
>it.

Yes, but, if there are two moves following one another on the same column you could discard the first one. As long as its done efficiently under the hood who cares.

Roy Lambert
Image