High marks for help, please help to solve the questions of DB2

1, ALTER TABLE TABLE_NAME ACTIVATE NOT LOOGED INITIALLY;
The DELETE operation is to write things log.
INSERT INTO whether the operation log write things.
QUEST CENTER check the aotocommit after this statement is valid, whether also to write the log.
Check the autocommit speed why so slow, a difference of 10 times.
A one billion data INSERT INTO, led directly to the transaction log is full.

2, CREATE TABLE TEST(ID_NO BIGINT,ID_NAME VARCHAR(20),....)PARTITIONING KEY (ID_NO) USING HASHING;
Only about 50000000 ID
Select * from TEST where id_no=1234567 partitioning key faster than.
With the index difference.

3
select a,b,sum(c),case when d in (1,2,3,4,5) then 1 when d in (0,6,7,8) then 2 end
from
(select a,b,c,d dtest1 union all

select a,b,c,d from test2
union all
select a,b,c,d from test3)
group by
a,b,case when d in (1,2,3,4,5) then 1 when d in (0,6,7,8) then 2 end;


select a,b,sum(c),d
from
(select a,b,c,case when d in (1,2,3,4,5) then 1 when d in (0,6,7,8) then 2 end d dtest1
union all
select a,b,c,case when d in (1,2,3,4,5) then 1 when d in (0,6,7,8) then 2 end d from test2
union all
select a,b,c,case when d in (1,2,3,4,5) then 1 when d in (0,6,7,8) then 2 end d from test3)
group by
a,b,d;

The above SQL execution efficiency has no difference, the amount of data in about one billion.

Started by Jesse at December 09, 2016 - 7:50 AM

The first problem and solve the third problems, second for help, thank you!

Posted by Jesse at December 19, 2016 - 8:13 AM

How did not do, or Oracle plate popularity

Posted by Jesse at January 01, 2017 - 8:42 AM

Here are a few.

Your question I can't answer you. .

Posted by Cheryl at January 10, 2017 - 9:39 AM