Hi,
Thank you for your posting.
The table is really used for a mix between OLTP and DSS.
CODE
create table t_x ( pk_col_1,pk_col_2, col_1 NUMBER(9) NOT NULL, col_2 VARCHAR2(20) NOT NULL, col_3 varchar2(20) NOT NULL, col_4 date, col_5 number,....) tablespace data_tbl;
no Triggers on the table, no promary key, an Unque index and 7 non unique Indexes
The most data about 65% of the data are with
CODE
col_1 IN (0,1,2)
AND col_2='L5'
AND col_3 in ('W1','W2','W3')
most of the queries a using col_1=n and col_2='x' and col_3='y'
or
col_1 in (0,1) and col_2='x' and col_3='y'
For an Insert or an Update in the tabe are selects used that takes about 5 Seconds per Records and this too slow.
I'm thinking about partitions as following:
CODE
case when col_1= 0 AND col_2='L5' and col_3='W1' then
Partition_01
case when col_1= 0 AND col_2='L5' and col_3='W2' then
Partition_02
case when col_1= 0 AND col_2='L5' and col_3='W3' then
Partition_03
case when col_1= 0 AND col_2='L5' and col_3 IS NULL OR col_3 NOT IN ('W1','W2','W3') ) then
Partition_04
case when col_1= 0 AND (col_2 IS NULL OR col_2 <> 'L5') then
Partition_05
--
case when col_1= 1 AND col_2='L5' and col_3='W1' then
Partition_11
case when col_1= 1 AND col_2='L5' and col_3='W2' then
Partition_12
case when col_1= 1 AND col_2='L5' and col_3='W3' then
Partition_13
case when col_1= 1 AND col_2='L5' and (col_3 IS NULL OR col_3 NOT IN ('W1','W2','W3') ) then
Partition_14
case when col_1= 1 AND (col_2 IS NULL OR col_2 <> 'L5') then
Partition_15
--
case when col_1= 2 AND col_2='L5' and col_3='W1' then
Partition_21
case when col_1= 2 AND col_2='L5' and col_3='W2' then
Partition_22
case when col_1= 2 AND col_2='L5' and col_3='W3' then
Partition_23
case when col_1= 2 AND col_2='L5' and (col_3 IS NULL OR col_3 NOT IN ('W1','W2','W3') ) then
Partition_24
case when col_1= 2 AND (col_2 IS NULL OR col_2 <> 'L5') then
Partition_25
--
Kind Regards
Ich