[PATCH] wc-ng: use TEMPORARY tables ...

View: New views
8 Messages — Rating Filter:   Alert me  

[PATCH] wc-ng: use TEMPORARY tables ...

by Bhuvaneswaran Arumugam :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
As discussed in this email thread [1], please find attached the patch to
use the TEMPORARY table when we want to remove columns from wc-ng
related tables, and reduce number of SQLs by not creating the TEMPORARY
tables explicitly.

[[
Use "CREATE TEMPORARY TABLE table_name AS SELECT" sql syntax to create
temporary table, while dropping columns from the original table.

* subversion/libsvn_wc/wc-metadata.sql
  (ACTUAL_NODE_BACKUP): Define as temporary table. Use "CREATE TEMPORARY
  TABLE table_name AS SELECT" syntax, instead of creating the table
  explicitly.
  (BASE_NODE_BACKUP): Use "CREATE TEMPORARY TABLE table_name AS SELECT"
  syntax, instead of creating the table explicitly.
]]

[1]
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2405630

--
Bhuvaneswaran A    
CollabNet Software P Ltd.  |  www.collab.net

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2407463
[wc-metadata.diff]

Index: subversion/libsvn_wc/wc-metadata.sql
===================================================================
--- subversion/libsvn_wc/wc-metadata.sql (revision 39903)
+++ subversion/libsvn_wc/wc-metadata.sql (working copy)
@@ -442,32 +442,9 @@
    number will be, however, so we're just marking it as 99 for now.  */
 -- format: 99
 
-/* We cannot directly remove columns, so we use a temporary table instead. */
-/* First create the temporary table without the undesired column(s). */
-CREATE TEMPORARY TABLE BASE_NODE_BACKUP(
-  wc_id  INTEGER NOT NULL,
-  local_relpath  TEXT NOT NULL,
-  repos_id  INTEGER,
-  repos_relpath  TEXT,
-  parent_relpath  TEXT,
-  presence  TEXT NOT NULL,
-  kind  TEXT NOT NULL,
-  revnum  INTEGER,
-  checksum  TEXT,
-  translated_size  INTEGER,
-  changed_rev  INTEGER,
-  changed_date  INTEGER,
-  changed_author  TEXT,
-  depth  TEXT,
-  symlink_target  TEXT,
-  last_mod_time  INTEGER,
-  properties  BLOB,
-  dav_cache  BLOB,
-  file_external  TEXT
-);
-
-/* Copy everything into the temporary table. */
-INSERT INTO BASE_NODE_BACKUP SELECT
+/* We cannot directly remove columns, so we create a temporary table and
+   copy everything except undesired column(s) into the temporary table. */
+CREATE TEMPORARY TABLE BASE_NODE_BACKUP AS SELECT
   wc_id, local_relpath, repos_id, repos_relpath, parent_relpath, presence,
   kind, revnum, checksum, translated_size, changed_rev, changed_date,
   changed_author, depth, symlink_target, last_mod_time, properties, dav_cache,
@@ -518,20 +495,7 @@
 DROP TABLE BASE_NODE_BACKUP;
 
 /* Now "drop" the tree_conflict_data column from actual_node. */
-CREATE TABLE ACTUAL_NODE_BACKUP (
-  wc_id  INTEGER NOT NULL,
-  local_relpath  TEXT NOT NULL,
-  parent_relpath  TEXT,
-  properties  BLOB,
-  conflict_old  TEXT,
-  conflict_new  TEXT,
-  conflict_working  TEXT,
-  prop_reject  TEXT,
-  changelist  TEXT,
-  text_mod  TEXT
-  );
-
-INSERT INTO ACTUAL_NODE_BACKUP SELECT
+CREATE TEMPORARY TABLE ACTUAL_NODE_BACKUP AS SELECT
   wc_id, local_relpath, parent_relpath, properties, conflict_old,
   conflict_new, conflict_working, prop_reject, changelist, text_mod
 FROM ACTUAL_NODE;



signature.asc (204 bytes) Download Attachment

Re: [PATCH] wc-ng: use TEMPORARY tables ...

by Bhuvaneswaran Arumugam :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Greg/Hyrum: ping?

On Wed, 2009-10-14 at 14:52 +0530, Bhuvaneswaran A wrote:

> Hello,
> As discussed in this email thread [1], please find attached the patch to
> use the TEMPORARY table when we want to remove columns from wc-ng
> related tables, and reduce number of SQLs by not creating the TEMPORARY
> tables explicitly.
>
> [[
> Use "CREATE TEMPORARY TABLE table_name AS SELECT" sql syntax to create
> temporary table, while dropping columns from the original table.
>
> * subversion/libsvn_wc/wc-metadata.sql
>   (ACTUAL_NODE_BACKUP): Define as temporary table. Use "CREATE TEMPORARY
>   TABLE table_name AS SELECT" syntax, instead of creating the table
>   explicitly.
>   (BASE_NODE_BACKUP): Use "CREATE TEMPORARY TABLE table_name AS SELECT"
>   syntax, instead of creating the table explicitly.
> ]]
>
> [1]
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2405630
>
> --
> Bhuvaneswaran A    
> CollabNet Software P Ltd.  |  www.collab.net
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2407463
--
Bhuvaneswaran A    
CollabNet Software P Ltd.  |  www.collab.net

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2410355

signature.asc (204 bytes) Download Attachment

Re: [PATCH] wc-ng: use TEMPORARY tables ...

by Gavin Baumanis-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ping. This patch submission has received no further comments.

Gavin.


On 23/10/2009, at 05:43 , Bhuvaneswaran A wrote:

> Greg/Hyrum: ping?
>
> On Wed, 2009-10-14 at 14:52 +0530, Bhuvaneswaran A wrote:
>> Hello,
>> As discussed in this email thread [1], please find attached the  
>> patch to
>> use the TEMPORARY table when we want to remove columns from wc-ng
>> related tables, and reduce number of SQLs by not creating the  
>> TEMPORARY
>> tables explicitly.
>>
>> [[
>> Use "CREATE TEMPORARY TABLE table_name AS SELECT" sql syntax to  
>> create
>> temporary table, while dropping columns from the original table.
>>
>> * subversion/libsvn_wc/wc-metadata.sql
>> (ACTUAL_NODE_BACKUP): Define as temporary table. Use "CREATE  
>> TEMPORARY
>> TABLE table_name AS SELECT" syntax, instead of creating the table
>> explicitly.
>> (BASE_NODE_BACKUP): Use "CREATE TEMPORARY TABLE table_name AS SELECT"
>> syntax, instead of creating the table explicitly.
>> ]]
>>
>> [1]
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2405630
>>
>> --
>> Bhuvaneswaran A
>> CollabNet Software P Ltd.  |  www.collab.net
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2407463
> --
> Bhuvaneswaran A
> CollabNet Software P Ltd.  |  www.collab.net
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2410355

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2412869

Re: [PATCH] wc-ng: use TEMPORARY tables ...

by Daniel Shahaf-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Gavin Baumanis wrote on Fri, 30 Oct 2009 at 11:33 +1100:
> Ping. This patch submission has received no further comments.

Gavin, are you filing issues for patch submissions that don't get
comments even after you ping them?  I found only three in the tracker:

http://subversion.tigris.org/issues/buglist.cgi?issue_type=PATCH&email1=gavinbaumanis&emailtype1=exact&emailreporter1=1&Submit+query=Submit+query

Daniel

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2412898

Re: [PATCH] wc-ng: use TEMPORARY tables ...

by Gavin Baumanis-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Daniel,

What I have been doing is pinging the list after (about) a week of no  
comments.
Then if another week passes after the ping - I then file it in the bug  
tracker and update the thread appropriately.

Please, feel free to provide alternate timings if you feel mine  
require a tweak!

Gavin.


On 30/10/2009, at 13:59 , Daniel Shahaf wrote:

> Gavin Baumanis wrote on Fri, 30 Oct 2009 at 11:33 +1100:
>> Ping. This patch submission has received no further comments.
>
> Gavin, are you filing issues for patch submissions that don't get
> comments even after you ping them?  I found only three in the tracker:
>
> http://subversion.tigris.org/issues/buglist.cgi?issue_type=PATCH&email1=gavinbaumanis&emailtype1=exact&emailreporter1=1&Submit+query=Submit+query
>
> Daniel

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2412911

Re: [PATCH] wc-ng: use TEMPORARY tables ...

by Daniel Shahaf-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

These times seem reasonable.  I just didn't understand why there seemed
to be far more "ping" emails than issues filed.  I guess the patches in
the difference have been applied :-).

Thanks for clarifying,

Daniel

Gavin 'Beau' Baumanis wrote on Fri, 30 Oct 2009 at 14:34 +1100:

> Hi Daniel,
>
> What I have been doing is pinging the list after (about) a week of no
> comments.
> Then if another week passes after the ping - I then file it in the bug tracker
> and update the thread appropriately.
>
> Please, feel free to provide alternate timings if you feel mine require a
> tweak!
>
> Gavin.
>
>
> On 30/10/2009, at 13:59 , Daniel Shahaf wrote:
>
> > Gavin Baumanis wrote on Fri, 30 Oct 2009 at 11:33 +1100:
> > > Ping. This patch submission has received no further comments.
> >
> > Gavin, are you filing issues for patch submissions that don't get
> > comments even after you ping them?  I found only three in the tracker:
> >
> > http://subversion.tigris.org/issues/buglist.cgi?issue_type=PATCH&email1=gavinbaumanis&emailtype1=exact&emailreporter1=1&Submit+query=Submit+query
> >
> > Daniel

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2412915

Re: [PATCH] wc-ng: use TEMPORARY tables ...

by Gavin Baumanis-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ping. This patch submission has received no comments.

Gavin.



On 23/10/2009, at 05:43 , Bhuvaneswaran A wrote:

> Greg/Hyrum: ping?
>
> On Wed, 2009-10-14 at 14:52 +0530, Bhuvaneswaran A wrote:
>> Hello,
>> As discussed in this email thread [1], please find attached the  
>> patch to
>> use the TEMPORARY table when we want to remove columns from wc-ng
>> related tables, and reduce number of SQLs by not creating the  
>> TEMPORARY
>> tables explicitly.
>>
>> [[
>> Use "CREATE TEMPORARY TABLE table_name AS SELECT" sql syntax to  
>> create
>> temporary table, while dropping columns from the original table.
>>
>> * subversion/libsvn_wc/wc-metadata.sql
>>  (ACTUAL_NODE_BACKUP): Define as temporary table. Use "CREATE  
>> TEMPORARY
>>  TABLE table_name AS SELECT" syntax, instead of creating the table
>>  explicitly.
>>  (BASE_NODE_BACKUP): Use "CREATE TEMPORARY TABLE table_name AS  
>> SELECT"
>>  syntax, instead of creating the table explicitly.
>> ]]
>>
>> [1]
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2405630
>>
>> --
>> Bhuvaneswaran A
>> CollabNet Software P Ltd.  |  www.collab.net
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2407463
> --
> Bhuvaneswaran A
> CollabNet Software P Ltd.  |  www.collab.net
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2410355

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2415365

Re: [PATCH] wc-ng: use TEMPORARY tables ...

by Gavin Baumanis-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have logged issue ; 3527
http://subversion.tigris.org/issues/show_bug.cgi?id=3527

Gavin.

On 07/11/2009, at 20:03 , Gavin Baumanis wrote:

> Ping. This patch submission has received no comments.
>
> Gavin.
>
>
>
> On 23/10/2009, at 05:43 , Bhuvaneswaran A wrote:
>
>> Greg/Hyrum: ping?
>>
>> On Wed, 2009-10-14 at 14:52 +0530, Bhuvaneswaran A wrote:
>>> Hello,
>>> As discussed in this email thread [1], please find attached the  
>>> patch to
>>> use the TEMPORARY table when we want to remove columns from wc-ng
>>> related tables, and reduce number of SQLs by not creating the  
>>> TEMPORARY
>>> tables explicitly.
>>>
>>> [[
>>> Use "CREATE TEMPORARY TABLE table_name AS SELECT" sql syntax to  
>>> create
>>> temporary table, while dropping columns from the original table.
>>>
>>> * subversion/libsvn_wc/wc-metadata.sql
>>> (ACTUAL_NODE_BACKUP): Define as temporary table. Use "CREATE  
>>> TEMPORARY
>>> TABLE table_name AS SELECT" syntax, instead of creating the table
>>> explicitly.
>>> (BASE_NODE_BACKUP): Use "CREATE TEMPORARY TABLE table_name AS  
>>> SELECT"
>>> syntax, instead of creating the table explicitly.
>>> ]]
>>>
>>> [1]
>>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2405630
>>>
>>> --
>>> Bhuvaneswaran A
>>> CollabNet Software P Ltd.  |  www.collab.net
>>>
>>> ------------------------------------------------------
>>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2407463
>> --
>> Bhuvaneswaran A
>> CollabNet Software P Ltd.  |  www.collab.net
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2410355
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2415365

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2417824