[ 
https://issues.apache.org/jira/browse/TRAFODION-2010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15569583#comment-15569583
 ] 

David Wayne Birdsall commented on TRAFODION-2010:
-------------------------------------------------

This is a duplicate of JIRA TRAFODION-1253 and JIRA TRAFODION-25.

In JIRA TRAFODION-25, I added costing code for insert and delete. I did the 
insert code first and I don't think it is very good code. The delete code is 
better.

There is some shared code between update and delete (they share a class; some 
methods are used for both). In doing the update code it is probably best to 
keep this, and to follow the example for delete.



> UPDATE/DELETE cannot generate a parallel plan properly
> ------------------------------------------------------
>
>                 Key: TRAFODION-2010
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2010
>             Project: Apache Trafodion
>          Issue Type: Bug
>            Reporter: liu ming
>            Assignee: Yang, Yongfeng
>
> For big UPDATE/DELETE, that is, affecting a lot of rows, for example, 10M 
> rows to update, Trafodion cannot generate a proper parallel plan by default. 
> So very slow.
> Reproduce steps:
> DDL
> CREATE TABLE T113B
>   (
>     UNIQ                             INT NO DEFAULT NOT NULL 
>   , C100K                            INT DEFAULT NULL  
>   , C10K                             INT DEFAULT NULL  
>   , C1K                              INT DEFAULT NULL 
>   , C100                             INT DEFAULT NULL 
>   , C10                              INT DEFAULT NULL  
>   , C1                               INT DEFAULT NULL  
>   , C0                               INT DEFAULT NULL ,
>   Primary key(uniq)
>   )
>   SALT USING 80 PARTITIONS
> ATTRIBUTES ALIGNED FORMAT
> ;
>  
> Populate data:
> upsert using load into t113b select
> 0 + (100000 * x100000) + (10000 * x10000) + (1000 * x1000) +
> (100 * x100) + (10 * x10) +( 1 * x1),
> 0 + (10000 * x10000) + (1000 * x1000) + (100 * x100) +
> (10 * x10) +( 1 * x1),
> 0 + (1000 * x1000) + (100 * x100) + (10 * x10) + (1 * x1),
> 0 + (100 * x100) + (10 * x10) + (1 * x1),
> 0 + (10 * x10) + (1 * x1),
> 0 + (1 * x1),
> 0,
> X0
> from (values(0)) t
> transpose 0,1,2,3,4,5,6,7,8,9 as x100000
> transpose 0,1,2,3,4,5,6,7,8,9 as x10000
> transpose 0,1,2,3,4,5,6,7,8,9 as x1000
> transpose 0,1,2,3,4,5,6,7,8,9 as x100
> transpose 0,1,2,3,4,5,6,7,8,9 as x10
> transpose 0,1,2,3,4,5,6,7,8,9 as x1
> transpose 0,1,2,3,4,5,6,7,8,9 as x0;
>  
> The update DML
> explain options 'f' update t113b set c0 = 0 where c1 = 0;
> DELETE is similar.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to