On Fri, Oct 9, 2009 at 14:34, Bhuvaneswaran A <bhuvan_at_collab.net> wrote:
> I've 2 queries related to wc-ng related sqls defined in wc-metadata.sql
> file:
>
> 1) We create backup tables explicitly to store records from original
> tables. We use the sqls in following style:
> create table foo_temp (col1 int);
> insert into foo_temp select col1 from foo;
> drop table foo;
> create table foo (col1 int);
> insert into foo select col1 from foo_temp;
> drop table foo_temp;
>
> Instead, why shouldn't use the following style:
> create table foo_temp as select col1 from foo;
> drop table foo;
> create table foo (col1 int);
> insert into foo select col1 from foo_temp;
> drop table foo_temp;
That seems fine. Maybe Hyrum didn't know a table could be created that way.
> 2) We use 2 backup tables, BASE_NODE_BACKUP and ACTUAL_NODE_BACKUP. The
> former is defined as a TEMPORARY table, while the latter is defined as
> normal table. Any specific reason for doing so? Why can't they maintain
> same standard, perhaps being a TEMPORARY table?
Yah, they should probably both be TEMPORARY.
Cheers,
-g
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2405633
Received on 2009-10-09 20:39:21 CEST