Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Portable way to DROP a COLUMN?..

Re: Portable way to DROP a COLUMN?..

From: Jim Kennedy <jim>
Date: Thu, 21 Sep 2006 20:46:58 -0700
Message-ID: <DYudndNflbB3xo7YnZ2dnUVZ_vydnZ2d@comcast.com>

"Mikhail Teterin" <usenet+meow_at_aldan.algebra.com> wrote in message news:18443205.HMKzz94e8m_at_aldan.algebra.com...
> Gints Plivna wrote:
>
> > In general if you'd like to create "portable applications" then you
> > have to be ready to make a separate layer for each of your DB's unless
> > you haven't all operations absolutely trivial.
>
> We have the layers. But we thought the operation of removing a column is,
> indeed, "absolutely trivial" and can be done by the higher layer :-(
>
> -mi

Dropping a column isn't trivial and should only be done when absolutely necessary. Think about what occurs when you drop a column. Let's say you have a 256 character description column that you now want to drop. (average of 125 characters) Let's say the table has a billion rows. So dropping the column means you are reducing the amount of data by almost 120 megs. However, the 120 megs is spread over the entire table. Should the RDBMS rewrite the entire table? Should it rewrite the structure? It usually is a pretty big operation.

Dynamically changing the data model especially dropping columns is something one wants to do with caution. It doesn't matter if one thinks it should be a standard syntax across all RDBMS's etc. Whatever the facts are the facts are.
Jim Received on Thu Sep 21 2006 - 22:46:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US