Quantcast

DROP COLUMN

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

DROP COLUMN

Jeremy Lemaire
Is there a command to drop a column from a table?
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
luciddb-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luciddb-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: DROP COLUMN

Zelaine Fong
Currently, no.

-- Zelaine


From: Jeremy Lemaire <[hidden email]>
To: [hidden email]
Sent: Thu, April 8, 2010 2:07:42 PM
Subject: [luciddb-users] DROP COLUMN

Is there a command to drop a column from a table?

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
luciddb-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luciddb-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: DROP COLUMN

John Sichi
Administrator
A pseudo-workaround is to create a view which selects everything
except the column that you don't want any more.  If your application
already has a view insulation layer, this is a way to achieve the
desired effect logically.  Physically, you can reclaim most of the
storage if the column is nullable by doing UPDATE T SET C = NULL; and
then ALTER SYSTEM DEALLOCATE OLD.  In this case, the UPDATE is done
column-wise, so no rows have to be copied, and the NULL's in the new
copy of the column will compress very nicely.

JVS

On Thu, Apr 8, 2010 at 2:54 PM, Zelaine Fong <[hidden email]> wrote:

> Currently, no.
>
> -- Zelaine
>
> ________________________________
> From: Jeremy Lemaire <[hidden email]>
> To: [hidden email]
> Sent: Thu, April 8, 2010 2:07:42 PM
> Subject: [luciddb-users] DROP COLUMN
>
> Is there a command to drop a column from a table?
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> luciddb-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/luciddb-users
>
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
luciddb-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luciddb-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: DROP COLUMN

Zelaine Fong
This may already be obvious, but if you use John's workaround of physically nulling out the column you want to drop, you'll need to explicitly specify the remaining columns when you execute your INSERT statements, so the missing columns will insert nulls by default.

Also, if you want to drop multiple columns from a table using this workaround, it's probably safest to update the columns to null, one at a time in separate UPDATE statements.  There's a heuristic in LucidDB that determines whether to do updates column-wise vs row-wise as described at http://pub.eigenbase.org/wiki/LucidDbDataStorageAndAccess#Replacement_of_Updated_Columns. If you're updating too many columns in a single statement in a table with not very many columns, the column-wise update might not kick in.

-- Zelaine


From: John Sichi <[hidden email]>
To: Mailing list for users of LucidDB <[hidden email]>
Cc: [hidden email]
Sent: Thu, April 8, 2010 3:22:01 PM
Subject: Re: [luciddb-users] DROP COLUMN

A pseudo-workaround is to create a view which selects everything
except the column that you don't want any more.  If your application
already has a view insulation layer, this is a way to achieve the
desired effect logically.  Physically, you can reclaim most of the
storage if the column is nullable by doing UPDATE T SET C = NULL; and
then ALTER SYSTEM DEALLOCATE OLD.  In this case, the UPDATE is done
column-wise, so no rows have to be copied, and the NULL's in the new
copy of the column will compress very nicely.

JVS

On Thu, Apr 8, 2010 at 2:54 PM, Zelaine Fong <[hidden email]> wrote:

> Currently, no.
>
> -- Zelaine
>
> ________________________________
> From: Jeremy Lemaire <[hidden email]>
> To: [hidden email]
> Sent: Thu, April 8, 2010 2:07:42 PM
> Subject: [luciddb-users] DROP COLUMN
>
> Is there a command to drop a column from a table?
> ------------------------------------------------------------------------------
> Download IntelĀ® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> luciddb-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/luciddb-users
>
>

------------------------------------------------------------------------------
Download IntelĀ® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
luciddb-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luciddb-users

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
luciddb-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luciddb-users
Loading...