Subpartitioning a partitioned table
Hi Experts,
I would like to sub-partition few of the hand picked partitions of a partitioned-table. Is it possible???
Below is my example partition table:
drop table part_tab purge;
create table part_tab (id number, name clob, dt date)
partition by range (dt) (
partition p1 values less than (to_date('01-2-2012', 'dd-mm-yyyy')),
partition p2 values less than (to_date('01-3-2012', 'dd-mm-yyyy')),
partition p3 values less than (to_date('01-4-2012', 'dd-mm-yyyy')),
partition p4 values less than (to_date('01-5-2012', 'dd-mm-yyyy')),
partition p5 values less than (to_date('01-6-2012', 'dd-mm-yyyy')),
partition p6 values less than (to_date('01-7-2012', 'dd-mm-yyyy')));
insert into part_tab select level, 'level-' || level, to_date( to_char(mod(level,25) + 1) || '-01-2012', 'dd-mm-yyyy') from dual connect by level < 100;
insert into part_tab select level, 'level-' || level, to_date( to_char(mod(level,25) + 1) || '-02-2012', 'dd-mm-yyyy') from dual connect by level < 100;
insert into part_tab select level, 'level-' || level, to_date( to_char(mod(level,25) + 1) || '-03-2012', 'dd-mm-yyyy') from dual connect by level < 100;
insert into part_tab select level, 'level-' || level, to_date( to_char(mod(level,25) + 1) || '-04-2012', 'dd-mm-yyyy') from dual connect by level < 100;
insert into part_tab select level, 'level-' || level, to_date( to_char(mod(level,25) + 1) || '-05-2012', 'dd-mm-yyyy') from dual connect by level < 100;
insert into part_tab select level, 'level-' || level, to_date( to_char(mod(level,25) + 1) || '-06-2012', 'dd-mm-yyyy') from dual connect by level < 100;
commit;
create index it_g_id on part_tab(id);
create index it_p_dt on part_tab(dt) local;
select index_name, status from user_indexes where table_name = 'PART_TAB';
select partition_name, status from user_ind_partitions where index_name in (select index_name from user_indexes where table_name = 'PART_TAB');Is it possible to sub-partition only partition p4 & p6?
Thanks for your time.
- P
>
I would like to sub-partition few of the hand picked partitions of a partitioned-table. Is it possible???
>
Yes and No - with a (possibly complex) explanation
No - it is not possible to create a subpartitioned table that does not have at least ONE subpartition for each partition. This wouldn't make sense anyway - if there is no subpartition for data to go to there is no point in having the partition at all so just don't create that partition.
Yes - it is possible to create custom sub-partitions for your hand-picked partitions. But the other partitions will still have at least one subpartition. If you don't create a subpartition template then Oracle will create a DEFAULT subpartition for them with a system generated name.
If you do create a subpartition template then it will be used for all partitions for which you do not specify custom subpartitioning.
Here is sample DDL based on yours
drop table part_tab1 cascade constraints
create table part_tab1 (id number, name clob, dt date)
partition by range (dt)
subpartition by list(id)
SUBPARTITION TEMPLATE(
subpartition TEMP_2_AND_3 values (2, 3),
subpartition TEMP_DEFAULT values (DEFAULT)
( partition p1 values less than (to_date('01-2-2012', 'dd-mm-yyyy')),
partition p2 values less than (to_date('01-3-2012', 'dd-mm-yyyy')),
partition p3 values less than (to_date('01-4-2012', 'dd-mm-yyyy')),
partition p4 values less than (to_date('01-5-2012', 'dd-mm-yyyy'))
subpartition P4_1_2_3 values (1, 2, 3),
subpartition P4_4_5_6 values (4, 5, 6),
subpartition P4_DEFAULT values (DEFAULT)
partition p5 values less than (to_date('01-6-2012', 'dd-mm-yyyy')),
partition p6 values less than (to_date('01-7-2012', 'dd-mm-yyyy'))
subpartition P6_7_8_9 values (7, 8, 9),
subpartition P6_DEFAULT values (DEFAULT)
)Note that custom subpartitioning has been specified for partitions p4 and p6 the subpartitioning is different for those two partitions.
In this example I have also specified DEFAULT subpartitions for P4, P6 and the subpartition template so that all subpartition data has somewhere to go.
Any data that does not map to one of the partitions will raise an exception. For example
(INSERT into part_tab1 values (1, 'abc', to_date('07-7-2012', 'dd-mm-yyyy') - 1/24)
ORA-14400: inserted partition key does not map to any partitionTo summarize
1. A subpartitioned table will ALWAYS have at least one subpartition for each partition
2. You can specify custom subpartitioning for any partition that is predefined (i.e. not for INTERVAL partitions).
3. The custom subpartitioning can be different for each partition
4. You can prevent inserting of data into the table by NOT providing a DEFAULT partition (as in your example). Attempts to insert such data will result in an ORA-14400 exception
5. You can also effectively prevent insertion into a partition by defining a subpartition (custom or DEFAULT) for a data value that will never exist in your data. No point in doing this since if no data can be inserted into the partition why have the partition to begin with?
Similar Messages
-
Modify HUGE HASH partition table to RANGE partition and HASH subpartition
I have a table with 130,000,000 rows hash partitioned as below
----RANGE PARTITION--
CREATE TABLE TEST_PART(
C_NBR CHAR(12),
YRMO_NBR NUMBER(6),
LINE_ID CHAR(2))
PARTITION BY RANGE (YRMO_NBR)(
PARTITION TEST_PART_200009 VALUES LESS THAN(200009),
PARTITION TEST_PART_200010 VALUES LESS THAN(200010),
PARTITION TEST_PART_200011 VALUES LESS THAN(200011),
PARTITION TEST_PART_MAX VALUES LESS THAN(MAXVALUE)
CREATE INDEX TEST_PART_IX_001 ON TEST_PART(C_NBR, LINE_ID);
Data: -
INSERT INTO TEST_PART
VALUES ('2000',200001,'CM');
INSERT INTO TEST_PART
VALUES ('2000',200009,'CM');
INSERT INTO TEST_PART
VALUES ('2000',200010,'CM');
VALUES ('2006',NULL,'CM');
COMMIT;
Now, I need to keep this table from growing by deleting records that fall b/w a specific range of YRMO_NBR. I think it will be easy if I create a range partition on YRMO_NBR field and then create the current hash partition as a sub-partition.
How do I change the current partition of the table from HASH partition to RANGE partition and a sub-partition (HASH) without losing the data and existing indexes?
The table after restructuring should look like the one below
COMPOSIT PARTITION-- RANGE PARTITION & HASH SUBPARTITION --
CREATE TABLE TEST_PART(
C_NBR CHAR(12),
YRMO_NBR NUMBER(6),
LINE_ID CHAR(2))
PARTITION BY RANGE (YRMO_NBR)
SUBPARTITION BY HASH (C_NBR) (
PARTITION TEST_PART_200009 VALUES LESS THAN(200009) SUBPARTITIONS 2,
PARTITION TEST_PART_200010 VALUES LESS THAN(200010) SUBPARTITIONS 2,
PARTITION TEST_PART_200011 VALUES LESS THAN(200011) SUBPARTITIONS 2,
PARTITION TEST_PART_MAX VALUES LESS THAN(MAXVALUE) SUBPARTITIONS 2
CREATE INDEX TEST_PART_IX_001 ON TEST_PART(C_NBR,LINE_ID);
Pls advice
Thanks in advanceSorry for the confusion in the first part where I had given a RANGE PARTITION instead of HASH partition. Pls read as follows;
I have a table with 130,000,000 rows hash partitioned as below
----HASH PARTITION--
CREATE TABLE TEST_PART(
C_NBR CHAR(12),
YRMO_NBR NUMBER(6),
LINE_ID CHAR(2))
PARTITION BY HASH (C_NBR)
PARTITIONS 2
STORE IN (PCRD_MBR_MR_02, PCRD_MBR_MR_01);
CREATE INDEX TEST_PART_IX_001 ON TEST_PART(C_NBR,LINE_ID);
Data: -
INSERT INTO TEST_PART
VALUES ('2000',200001,'CM');
INSERT INTO TEST_PART
VALUES ('2000',200009,'CM');
INSERT INTO TEST_PART
VALUES ('2000',200010,'CM');
VALUES ('2006',NULL,'CM');
COMMIT;
Now, I need to keep this table from growing by deleting records that fall b/w a specific range of YRMO_NBR. I think it will be easy if I create a range partition on YRMO_NBR field and then create the current hash partition as a sub-partition.
How do I change the current partition of the table from hash partition to range partition and a sub-partition (hash) without losing the data and existing indexes?
The table after restructuring should look like the one below
COMPOSIT PARTITION-- RANGE PARTITION & HASH SUBPARTITION --
CREATE TABLE TEST_PART(
C_NBR CHAR(12),
YRMO_NBR NUMBER(6),
LINE_ID CHAR(2))
PARTITION BY RANGE (YRMO_NBR)
SUBPARTITION BY HASH (C_NBR) (
PARTITION TEST_PART_200009 VALUES LESS THAN(200009) SUBPARTITIONS 2,
PARTITION TEST_PART_200010 VALUES LESS THAN(200010) SUBPARTITIONS 2,
PARTITION TEST_PART_200011 VALUES LESS THAN(200011) SUBPARTITIONS 2,
PARTITION TEST_PART_MAX VALUES LESS THAN(MAXVALUE) SUBPARTITIONS 2
CREATE INDEX TEST_PART_IX_001 ON TEST_PART(C_NBR,LINE_ID);
Pls advice
Thanks in advance -
EXCHANGE SUBPARTITION between two Partitioned tables
DB Version: 10.2.0.5
We have :
Table A(Range-List Partitioned):
Partition A1 -> Sub-Partition S1A1 and S2A1
Partition A2 -> Sub-Partition S1A2 and S2A2
Table B(Range-List Partitioned):
Partition B1 -> Sub-Partition S1B1 and S2B1
Partition B2 -> Sub-Partition S1B2 and S2B2
I would like to EXCHANGE SUBPARITION A.S1A1 with B.S1B1, and S2A1 with S2B1 and S1A2 with S1B2 ...so on. Which means, how do I exchange subpartitions between two similar tables?
The following statement does not work...
ALTER TABLE A EXCHANGE SUBPARTITION S1A1
WITH TABLE B SUBPARTITION S1B1 INCLUDING INDEXES;
Please advice.Hi,
ALTER TABLE A EXCHANGE SUBPARTITION S1A1 WITH TABLE B INCLUDING INDEXES;
Read the document
http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10739/partiti.htm
Regards
Hitgon -
GATHER_TABLE_STATS on partitioned table
Hello All,
I am using Oracle 11g R2.
I am having a partitioned table, this table can have up to 30 partitions based on my retention policy and each partition is 1 day of data. each partition have like 3 millions records.
I am gathering the statistics of my current partition as below:
DBMS_STATS.GATHER_TABLE_STATS (SCHEMA_NAME, TABLE_NAME, PARTITION_NAME, ESTIMATE_PERCENT => DBMS_STATS.AUTO_SAMPLE_SIZE, METHOD_OPT=> 'FOR ALL COLUMNS SIZE AUTO');I noticed that when the table have 6 or 7 partitions the above gather statistics was taking like 20 mins. now I have 20 partitions on the table it is taking 45 minutes.
What is the reason ? should not be the same ? as I am gathering the statistics for only 1 partition ? and all partitions have the same number of records?
Regards,What is the default ? granularity=>'ALL' or granularity=>'PARTITION' in the belowAUTO
GRANULARITY - The value determines granularity of statistics to collect (only pertinent if the table is partitioned).
'ALL' - gathers all (subpartition, partition, and global) statistics
'AUTO'- determines the granularity based on the partitioning type. This is the default value.
'DEFAULT' - gathers global and partition-level statistics. This option is obsolete, and while currently supported, it is included in the documentation for legacy reasons only. You should use the 'GLOBAL AND PARTITION' for this functionality. Note that the default value is now 'AUTO'.
'GLOBAL' - gathers global statistics
'GLOBAL AND PARTITION' - gathers the global and partition level statistics. No subpartition level statistics are gathered even if it is a composite partitioned object.
'PARTITION '- gathers partition-level statistics
'SUBPARTITION' - gathers subpartition-level statistics.
Regards
Girish Sharma
Edited by: Girish Sharma on Mar 11, 2013 7:39 PM
http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_stats.htm#ARPLS059
Added doc link. -
Analyse a partitioned table with more than 50 million rows
Hi,
I have a partitioned table with more than 50 million rows. The last analyse is on 1/25/2007. Do I need to analyse him? (query runs on this table is very slow).
If I need to analyse him, what is the best way? Use DBMS_STATS and schedule a job?
ThanksA partitioned table has global statistics as well as partition (and subpartition if the table is subpartitioned) statistics. My guess is that you mean to say that the last time that global statistics were gathered was in 2007. Is that guess accurate? Are the partition-level statistics more recent?
Do any of your queries actually use global statistics? Or would you expect that every query involving this table would specify one or more values for the partitioning key and thus force partition pruning to take place? If all your queries are doing partition pruning, global statistics are irrelevant, so it doesn't matter how old and out of date they are.
Are you seeing any performance problems that are potentially attributable to stale statistics on this table? If you're not seeing any performance problems, leaving the statistics well enough alone may be the most prudent course of action. Gathering statistics would only have the potential to change query plans. And since the cost of a query plan regressing is orders of magnitude greater than the benefit of a different query performing faster (at least for most queries in most systems), the balance of risks would argue for leaving the stats alone if there is no problem you're trying to solve.
If your system does actually use global statistics and there are performance problems that you believe are potentially attributable to stale global statistics and your partition level statistics are accurate, you can gather just global statistics on the table probably with a reasonably small sample size. Make sure, though, that you back up your existing statistics just in case a query plan goes south. Ideally, you'd also have a test environment with identical (or nearly identical) data volumes that you could use to verify that gathering statistics doesn't cause any problems.
Justin -
Create Partition tables in PL/SQL using Execute Immediate
Hi
I have to create a partiton table in PL/SQL using Execute Immediate. I concat the necessary Create Table syntax into a variable and use Execute Immediate variable name. This gives a error ORA-00900: invalid SQL statement. However if i cut and paste the SQL statement from DBMS_OUTPUT, the table creation goes through without any problem.
What could be the issue. Has anyone face this before please.
I am using 10G DBThanks for your reply. It is a big code. I am pasting the part required.
v_sqlstmtout :='CREATE TABLE a_10(MYDATE DATE NOT NULL,ID NUMBER(14) NOT NULL)';
v_sqlstmtout := v_sqlstmtout || ' PARTITION BY RANGE (MYDATE) ';
v_sqlstmtout := v_sqlstmtout || 'SUBPARTITION BY HASH(id) ';
v_sqlstmtout := v_sqlstmtout || 'SUBPARTITION TEMPLATE(';
v_sqlstmtout := v_sqlstmtout || 'SUBPARTITION SP1,SUBPARTITION SP2) ';
v_sqlstmtout := v_sqlstmtout || '(PARTITION mth_dummy VALUES LESS THAN ';
v_sqlstmtout := v_sqlstmtout || '('||V_SQLSTMT3||')' || v_sqlstmt||')';
EXECUTE IMMEDIATE ''''||v_sqlstmtout||'''';
variables are substituted through data from different tables.
The output looks like the following
CREATE TABLE a_10(MYDATE DATE NOT NULL,ID NUMBER(14) NOT NULL)
PARTITION BY RANGE (mydate) SUBPARTITION BY HASH(id) SUBPARTITION
TEMPLATE(SUBPARTITION SP1,SUBPARTITION SP2) (PARTITION mth_dummy VALUES
LESS THAN ('01-MAY-2006'), PARTITION mth_JAN2007 VALUES LESS THAN
('01-FEB-2007'))
The above is the output from DBMS_OUTPUT. If i run this statement the table is created. Please help.. -
How to manage large partitioned table
Dear all,
we have a large partitioned table with 126 columns and 380G not indexed can any one tell me how to manage it because now the queries are taking more that 5 days
looking forward for your reply
thank youHi,
You can store partitioned tables in separate tablespaces. This does the following:
Reduce the possibility of data corruption in multiple partitions
Back up and recover each partition independently
Control the mapping of partitions to disk drives (important for balancing I/O load)
Improve manageability, availability, and performance
Remeber as the doc states :
The maximum number of partitions or subpartitions that a table may have is 1024K-1.
Lastly you can use SQL*Loader and the import and export utilities to load or unload data stored in partitioned tables. These utilities are all partition and subpartition aware.
Document Reference:
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14231/partiti.htm
Adith -
Gathering statistics on partitioned and non-partitioned tables
Hi all,
My DB is 11.1
I find that gathering statistics on partitioned tables are really slow.
TABLE_NAME NUM_ROWS BLOCKS SAMPLE_SIZE LAST_ANALYZED PARTITIONED COMPRESSION
O_FCT_BP1 112123170 843140 11212317 8/30/2011 3:5 NO DISABLED
LEON_123456 112096060 521984 11209606 8/30/2011 4:2 NO ENABLED
O_FCT 115170000 486556 115170 8/29/2011 6:3 YES
SQL> SELECT COUNT(*) FROM user_tab_subpartitions
2 WHERE table_name =O_FCT'
3 ;
COUNT(*)
112I used the following script:
BEGIN
DBMS_STATS.GATHER_TABLE_STATS(ownname => user,
tabname => O_FCT',
method_opt => 'for all columns size auto',
degree => 4,
estimate_percent =>10,
granularity => 'ALL',
cascade => false);
END;
/It costs 2 mins for the first two tables to gather the statistics respectively, but more than 10 mins for the partitioned table.
The time of collecting statistics accounts for a large part of total batch time.
And most jobs of the batch are full load in which case all partitions and subpartitions will be affected and we can't just gather specified partitions.
Does anyone have some experiences on this subject? Thank you very much.
Best regards,
Leon
Edited by: user12064076 on Aug 30, 2011 1:45 AMHi Leon
Why don't you gather stats at partition level? If your partitions data is not going to change after a day (date range partition for ex), you can simply do at partition level
GRANULARITY=>'PARTITION' for partition level and
GRANULARITY=>'SUBPARTITION' for subpartition level
You are gathering global stats every time which you may not require.
Edited by: user12035575 on 30-Aug-2011 01:50 -
Problems with partition tables
Hi all,
I've got some problems with partition tables. The script at the bottom run but when I wanna insert some values it returns me an error
(ORA-06550: line 1, column 30: PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated
ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored)
and I can't understand why!
There's something incorrect in the script or not?
Please help me
Thanks in advance
Steve
CREATE TABLE TW_E_CUSTOMER_UNIFIED
ID_CUSTOMER_UNIFIED VARCHAR2 (27) NOT NULL ,
START_VALIDITY_DATE DATE NOT NULL ,
END_VALIDITY_DATE DATE ,
CUSTOMER_STATUS VARCHAR2 (255)
PARTITION BY RANGE (START_VALIDITY_DATE)
SUBPARTITION BY LIST (END_VALIDITY_DATE)
PARTITION M200909 VALUES LESS THAN (TO_DATE('20091001','YYYYMMDD'))
(SUBPARTITION M200909_N VALUES (NULL), SUBPARTITION M200909_NN VALUES (DEFAULT)),
PARTITION M200910 VALUES LESS THAN (TO_DATE('20091101','YYYYMMDD'))
(SUBPARTITION M200910_N VALUES (NULL), SUBPARTITION M200910_NN VALUES (DEFAULT)),
PARTITION M200911 VALUES LESS THAN (TO_DATE('20091201','YYYYMMDD'))
(SUBPARTITION M200911_N VALUES (NULL), SUBPARTITION M200911_NN VALUES (DEFAULT)),
PARTITION M200912 VALUES LESS THAN (TO_DATE('20100101','YYYYMMDD'))
(SUBPARTITION M200912_N VALUES (NULL), SUBPARTITION M200912_NN VALUES (DEFAULT)),
PARTITION M201001 VALUES LESS THAN (TO_DATE('20100201','YYYYMMDD'))
(SUBPARTITION M201001_N VALUES (NULL), SUBPARTITION M201001_NN VALUES (DEFAULT)),
PARTITION M201002 VALUES LESS THAN (TO_DATE('20100301','YYYYMMDD'))
(SUBPARTITION M201002_N VALUES (NULL), SUBPARTITION M201002_NN VALUES (DEFAULT)),
PARTITION M210001 VALUES LESS THAN (MAXVALUE))
(SUBPARTITION M210001_N VALUES (NULL), SUBPARTITION M210001_NN VALUES (DEFAULT))
;Hi Hoek,
the DB version is 10.2 (italian version, then SET is correct).
...there's something strange: now I can INSERT rows but I can't update them!
I'm using this command string:
UPDATE TW_E_CUSTOMER_UNIFIED SET END_VALIDITY_DATE = TO_DATE('09-SET-09', 'DD-MON-RR') WHERE
id_customer_unified = '123' and start_validity_date = TO_DATE('09-SET-09', 'DD-MON-RR');
And this is the error:
Error SQL: ORA-14402: updating partition key column would cause a partition change
14402. 00000 - "updating partition key column would cause a partition change"
*Cause: An UPDATE statement attempted to change the value of a partition
key column causing migration of the row to another partition
*Action: Do not attempt to update a partition key column or make sure that
the new partition key is within the range containing the old
partition key.
I think that is impossible to use a PARTITION/SUBPARTITION like that: in fact the update of "END_VALIDITY_DATE" cause a partition change.
Do u agree or it's possible an update on a field that implies a partition change?
Regards Steve -
Create partition table upto level 3
Hi All,
I want to create partition table using 3 columns. could you please tell me is that possible to do in oracle 11G. if can please tell me the way to create
PARTITION BY LIST (Acct_type)
SUBPARTITION BY LIST (PERIOD)
and needs to partition this using another column.( account_source)
please help me.
Regards,
krishHello,
3 levels of partition are not possible.
But perhaps you can combine 2 levels as follows:
With Oracle 11g you can use a virtual column:
CREATE TABLE F_ACCOUNT_PART
acc_type varchar2(100),
acc_source varchar2(100),
period date,
acc_type_source varchar2(201) as (acc_type||'_'||acc_source) )
PARTITION BY LIST (acc_type_source)
PARTITION FA_AA_ACC1 VALUES ('AA-ACC1') TABLESPACE USERS,
PARTITION FA_BB_ACC1 VALUES ('BB-ACC1') TABLESPACE USERS,
PARTITION FA_CC_ACC1 VALUES ('CC-ACC1') TABLESPACE USERS,
PARTITION FA_DD_ACC1 VALUES ('DD-ACC1') TABLESPACE USERS,
PARTITION FA_AA_ACC2 VALUES ('AA-ACC2') TABLESPACE USERS,
PARTITION FA_BB_ACC2 VALUES ('BB-ACC2') TABLESPACE USERS,
PARTITION FA_CC_ACC2 VALUES ('CC-ACC2') TABLESPACE USERS,
PARTITION FA_DD_ACC2 VALUES ('DD-ACC2') TABLESPACE USERS,
PARTITION all_other VALUES (DEFAULT) TABLESPACE USERS
)For versions prior to 11g you have to build a new column acc_type_source and fill the values cancatenated.
Maik -
Importing Some Partion of a Partitioned Table
Hi Guru's,
I import a partitioned table using original import option, during import i am successful to import 80% of data but after that import discontinued due to n/w error. I just want to know can i continue my import from where it is discontinued or i need to import the complete partitioned table again. The export dump file is complete partitioned table export not partition wise export.
Any help will be greatly appreciated.
Thank in advance.>
I import a partitioned table using original import option, during import i am successful to import 80% of data but after that import discontinued due to n/w error. I just want to know can i continue my import from where it is discontinued or i need to import the complete partitioned table again. The export dump file is complete partitioned table export not partition wise export.
>
Use the TABLES clause in the import statement.
See the Utilities doc
http://docs.oracle.com/cd/B28359_01/server.111/b28319/dp_import.htm
>
TABLES
Default: There is no default
Purpose
Specifies that you want to perform a table-mode import.
Syntax and Description
TABLES=[schema_name.]table_name[:partition_name]
In a table-mode import, you can filter the data that is imported from the source by specifying a comma-delimited list of tables and partitions or subpartitions.
If you do not supply a schema_name, it defaults to that of the current user. To specify a schema other than your own, you must either have the IMP_FULL_DATABASE role or remap the schema to the current user.
The use of filtering can restrict what is imported using this import mode. See Filtering During Import Operations.
If a partition_name is specified, it must be the name of a partition or subpartition in the associated table.
>
The doc has an example
>
The following example shows the use of the TABLES parameter to import partitions:
impdp hr DIRECTORY=dpump_dir1 DUMPFILE=expdat.dmp TABLES=sh.sales:sales_Q1_2000,sh.sales:sales_Q2_2000 -
Create list-range partition table
Database version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
I am trying to create a partition table with LIST-Range, and I am getting this following error, is oracle 10.2.0.4 database supports to create list-range partition(composite)
SQL> CREATE TABLE tbp_list_range
REPORT_DATE DATE,
member_id_01 varchar2(2),
DATE_SERVICE date,
member_id varchar2(15)
PARTITION BY LIST(member_id_01)
SUBPARTITION BY RANGE (DATE_SERVICE)
PARTITION SPTYR04M01_C VALUES('AA','aa')
NOLOGGING
COMPRESS (
SUBPARTITION PTYR12M011 VALUES LESS THAN (TO_DATE(' 2012-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
SUBPARTITION PTYR12M021 VALUES LESS THAN (TO_DATE(' 2012-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
SUBPARTITION recent1 VALUES LESS THAN (MAXVALUE)
PARTITION SPTYR04M01_Yo VALUES('BJ','bj')
NOLOGGING
COMPRESS (
SUBPARTITION PTYR12M01 VALUES LESS THAN (TO_DATE(' 2012-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
SUBPARTITION PTYR12M02 VALUES LESS THAN (TO_DATE(' 2012-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
SUBPARTITION recent2 VALUES LESS THAN (MAXVALUE)
SUBPARTITION BY RANGE (DATE_SERVICE)
ERROR at line 9:
ORA-00922: missing or invalid option
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
Any help would be greatly appreciated.
Thanks,any possible work around for this scenario on 10.2.0.4
--thanks -
Hi Experts,
Actually i have Production Partition table SMS_DELIVERY_NODETAILS its have partitions "PS_WD_01,PS_WD_02........... PS_WD_30". Partition base on date "TOOPERATOR" column like "10-11-2012 , 11-11-2012 ........".
I have create local index "DELIVERY_CAMP" on "CAMPAIGN_NAME" column.
I face issue in :
case 1: Query using index "DELIVERY_CAMP" when i was use query with partition name "PS_WD_07"
case 2: when query running with TOOPERATOR='2012-11-25' then table_sance_full.
Oracle version =10g
Os version = Linux 5.5
SQL> DESC SMS_DELIVERY_NODETAILS
Name Null? Type
MSISDN VARCHAR2(15)
TRANSACTIONID NOT NULL VARCHAR2(50)
TOOPERATOR VARCHAR2(25)
FROMOPERATOR VARCHAR2(25)
STATUS VARCHAR2(25)
TID_INDEX NUMBER
CAMPAIGN_NAME VARCHAR2(100)
NETWORK_ERROR_CODE VARCHAR2(20)
Case 1:
SQL> EXPLAIN PLAN FOR
2 SELECT count(*) from SMS_DELIVERY_NODETAILS partition(PS_WD_07) where CAMPAIGN_NAME ='1353814653772_ftp_Churnscore100_pe_100';
Explained.
SQL> set line 200
@?/rdbms/admin/utlxpls.sql
SQL>
PLAN_TABLE_OUTPUT
Plan hash value: 2934568714
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
| 0 | SELECT STATEMENT | | 1 | 38 | 53 (0)| 00:00:01 | | |
| 1 | SORT AGGREGATE | | 1 | 38 | | | | |
| 2 | PARTITION RANGE SINGLE| | 6320 | 234K| 53 (0)| 00:00:01 | 31 | 31 |
| 3 | PARTITION LIST ALL | | 6320 | 234K| 53 (0)| 00:00:01 | 1 | 100 |
|* 4 | INDEX RANGE SCAN | DELIVERY_CAMP | 6320 | 234K| 53 (0)| 00:00:01 | 3001 | 3100 |
PLAN_TABLE_OUTPUT
Predicate Information (identified by operation id):
4 - access("CAMPAIGN_NAME"='1353814653772_ftp_Churnscore100_pe_100')
16 rows selected.
case 2:
SQL> SQL> EXPLAIN PLAN FOR
2 SELECT count(*) from SMS_DELIVERY_NODETAILS WHERE TOOPERATOR='2012-11-25' and CAMPAIGN_NAME ='1353814653772_ftp_Churnscore100_pe_100';
Explained.
SQL> @?/rdbms/admin/utlxpls.sql
PLAN_TABLE_OUTPUT
Plan hash value: 3258763602
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
| 0 | SELECT STATEMENT | | 1 | 58 | 76394 (2)| 00:15:17 | | |
| 1 | SORT AGGREGATE | | 1 | 58 | | | | |
| 2 | PARTITION RANGE SINGLE| | 1 | 58 | 76394 (2)| 00:15:17 | 31 | 31 |
| 3 | PARTITION LIST ALL | | 1 | 58 | 76394 (2)| 00:15:17 | 1 | 100 |
|* 4 | TABLE ACCESS FULL | SMS_DELIVERY_NODETAILS | 1 | 58 | 76394 (2)| 00:15:17 | 3001 | 3100 |
PLAN_TABLE_OUTPUT
Predicate Information (identified by operation id):
4 - filter("TOOPERATOR"='2012-11-25' AND "CAMPAIGN_NAME"='1353814653772_ftp_Churnscore100_pe_100')
16 rows selected.Dear rp0428 ,
1. the table and index DDL
Table=>
Table_name Partition_name Subpartition_name
SMS_DELIVERY_NODETAILS TOOPERATOR TID_INDEX
Index=>
create local index DELIVERY_TID_MSISDN_NODETAILS on SMS_DELIVERY_NODETAILS(TRANSACTIONID,MSISDN);
create local index DELIVERY_CAMP on SMS_DELIVERY_NODETAILS(CAMPAIGN_NAME);2. the query you used to collect the table and index stats
SELECT count(*) from SMS_DELIVERY_NODETAILS WHERE TOOPERATOR='2012-11-25' and CAMPAIGN_NAME ='1353814653772_ftp_Churnscore100_pe_100'; 3. the table, partition,subpartition row counts
SQL> select PARTITION_POSITION,PARTITION_NAME,SUBPARTITION_COUNT,HIGH_VALUE from user_tab_partitions where TABLE_NAME='SMS_DELIVERY_NODETAILS' order by PARTITION_POSITION ;
PARTITION_POSITION PARTITION_NAME SUBPARTITION_COUNT HIGH_VALUE
1 PS_WD_10 100 '2012-10-28'
2 PS_WD_11 100 '2012-10-29'
3 PS_WD_12 100 '2012-10-30'
4 PS_WD_13 100 '2012-10-31'
5 PS_WD_14 100 '2012-11-01'
6 PS_WD_15 100 '2012-11-02'
7 PS_WD_16 100 '2012-11-03'
8 PS_WD_17 100 '2012-11-04'
9 PS_WD_18 100 '2012-11-05'
10 PS_WD_19 100 '2012-11-06'
11 PS_WD_20 100 '2012-11-07'
PARTITION_POSITION PARTITION_NAME SUBPARTITION_COUNT HIGH_VALUE
12 PS_WD_21 100 '2012-11-08'
13 PS_WD_22 100 '2012-11-09'
14 PS_WD_23 100 '2012-11-10'
15 PS_WD_24 100 '2012-11-11'
16 PS_WD_25 100 '2012-11-12'
17 PS_WD_26 100 '2012-11-13'
18 PS_WD_27 100 '2012-11-14'
19 PS_WD_28 100 '2012-11-15'
20 PS_WD_29 100 '2012-11-16'
21 PS_WD_30 100 '2012-11-17'
22 PS_WD_31 100 '2012-11-18'
PARTITION_POSITION PARTITION_NAME SUBPARTITION_COUNT HIGH_VALUE
23 PS_WD_32 100 '2012-11-19'
24 PS_WD_01 100 '2012-11-20'
25 PS_WD_02 100 '2012-11-21'
26 PS_WD_03 100 '2012-11-22'
27 PS_WD_04 100 '2012-11-23'
28 PS_WD_05 100 '2012-11-24'
29 PS_WD_06 100 '2012-11-25'
30 PS_WD_07 100 '2012-11-26'
31 PS_WD_08 100 '2012-11-27'
32 PS_WD_09 100 '2012-11-28'
33 PS_WD_DEFAULT 100 MAXVALUE
33 rows selected. -
HOW to enable oracle advance compression for EXIST partitioned table
Hi All,
I have to enable oracle advance compression for existing table which PARTITION BY RANGE then SUBPARTITION BY HASH.
ORacle version: 11.2.0.2.0
Please provide me any relevant doc or any exp.
Thanks in advance.could not see any text for how to enable oracle advance compression for EXIST partitioned table.RTFM.
From the resource above:
How do I compress an existing table?
There are multiple options available to compress existing tables. For offline compression, one could use ALTER TABLE Table_Name MOVE COMPRESS statement. A compressed copy of an existing table can be created by using CREATE TABLE Table_Name COMPRESS FOR ALL OPERATIONS AS SELECT *. For online compression, Oracle’s online redefinition utility can be used. More details for online redefinition are available here.
" -
Range interavl partitioned table not being created in compressed format
Hi,
Using oracle 11.2.03. and trying to create a table with compress
Normal table fine but trying syntax below but tabel properties show no compression
Tried compress at top of sql as per belwo and at bottom
Aldso tried compress and compress for oltp - same bahviour not getting compressed.
nOW HSOING AT TABLE LEVEL OR ON TABLE PORPETIES BUT WHEN check user_tab_partitions shows as compressed for oltp
Thanks
create table RETAILER_TRANSACTION_comP_POR parallel
COMPRESS FOR OLTP
partition by range (PARTITIONING_DATE)
INTERVAL (NUMTOYMINTERVAL(1,'MONTH'))
subpartition by hash (PLANT_ISSUE_ID)
subPARTITIONS 4
partition PART_200912 values less than (TO_DATE(' 2010-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_200912
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201001 values less than (TO_DATE(' 2010-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201001
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201002 values less than (TO_DATE(' 2010-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201002
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201003 values less than (TO_DATE(' 2010-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201003
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201004 values less than (TO_DATE(' 2010-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201004
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201005 values less than (TO_DATE(' 2010-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201005
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201006 values less than (TO_DATE(' 2010-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201006
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201007 values less than (TO_DATE(' 2010-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201007
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201008 values less than (TO_DATE(' 2010-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201008
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201009 values less than (TO_DATE(' 2010-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201009
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201010 values less than (TO_DATE(' 2010-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201010
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201011 values less than (TO_DATE(' 2010-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201011
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201012 values less than (TO_DATE(' 2011-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201012
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201101 values less than (TO_DATE(' 2011-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201101
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201102 values less than (TO_DATE(' 2011-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201102
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201103 values less than (TO_DATE(' 2011-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201103
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201104 values less than (TO_DATE(' 2011-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201104
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201105 values less than (TO_DATE(' 2011-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201105
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201106 values less than (TO_DATE(' 2011-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201106
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201107 values less than (TO_DATE(' 2011-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201107
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201108 values less than (TO_DATE(' 2011-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201108
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201109 values less than (TO_DATE(' 2011-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201109
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201110 values less than (TO_DATE(' 2011-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201110
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201111 values less than (TO_DATE(' 2011-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201111
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201112 values less than (TO_DATE(' 2012-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201112
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201201 values less than (TO_DATE(' 2012-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201201
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201202 values less than (TO_DATE(' 2012-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201202
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201203 values less than (TO_DATE(' 2012-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201203
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201204 values less than (TO_DATE(' 2012-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201204
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201205 values less than (TO_DATE(' 2012-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201205
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201206 values less than (TO_DATE(' 2012-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201206
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201207 values less than (TO_DATE(' 2012-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201207
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201208 values less than (TO_DATE(' 2012-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201208
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201209 values less than (TO_DATE(' 2012-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201209
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201210 values less than (TO_DATE(' 2012-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201210
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201211 values less than (TO_DATE(' 2012-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201211
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201212 values less than (TO_DATE(' 2013-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201212
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201301 values less than (TO_DATE(' 2013-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201301
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201302 values less than (TO_DATE(' 2013-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201302
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201303 values less than (TO_DATE(' 2013-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201303
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201304 values less than (TO_DATE(' 2013-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201304
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201305 values less than (TO_DATE(' 2013-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201305
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201306 values less than (TO_DATE(' 2013-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201306
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201307 values less than (TO_DATE(' 2013-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201307
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201308 values less than (TO_DATE(' 2013-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201308
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201309 values less than (TO_DATE(' 2013-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201309
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201310 values less than (TO_DATE(' 2013-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201310
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201311 values less than (TO_DATE(' 2013-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201311
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
partition PART_201312 values less than (TO_DATE(' 2014-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
tablespace RTRN_PART_201312
pctfree 1
initrans 1
maxtrans 255
storage
initial 8M
next 1M
minextents 1
maxextents unlimited
--COMPRESS --FOR OLTP
as select *
from retailer_transaction RT
WHERE RT.DWH_NUM = 1441336376Edited by: user5716448 on 26-Mar-2013 07:16>
Normal table fine but trying syntax below but tabel properties show no compression
>
What properties? You didn't show any query or result that shows if the table is compressed or not.
>
nOW HSOING AT TABLE LEVEL OR ON TABLE PORPETIES BUT WHEN check user_tab_partitions shows as compressed for oltp
>
I have no idea what any of that means.
Again - you didn't post anything showing if the table is compressed or not. And without the DDL for the source table no one can try to reproduce your results.
Thanks for using code tags and posting some of the DDL needed but you should edit your post and REMOVE all of the extra partition definitions since all they do is bloat the listing.
This works for me in vanilla 11.2.0.1.0
create table EMP_PART parallel
COMPRESS FOR OLTP
partition by range (hiredate)
INTERVAL (NUMTOYMINTERVAL(1,'MONTH'))
subpartition by hash (deptno)
subPARTITIONS 4
partition all_data values less than (to_date('01/01/2013', 'mm/dd/yyyy')
as select * from emp
select table_name, compression, compress_for, composite, partition_name
from user_tab_partitions
TABLE_NAME COMPRESSION COMPRESS_FOR COMPOSITE PARTITION_NAME
EMP_PART ENABLED OLTP YES ALL_DATA
Maybe you are looking for
-
Tools to list classes used in the project/
Hi is there any tool that would list all the classes and packages used in my project. the tools must be something like getting input as a main class and list all the other classes used in the project. ? -- MJ
-
Canon MP640 - "No scanner selected" bug in Snow Leopard
Hi! I use a Canon MP640 printer/scanner combo unit WITHOUT installing any software from Canon. I like to stick with the built-in functionality of Mac OS X. Which means scanning via Preview.app or ImageCapture.app. Until recently everything worked fla
-
Import photos from friend's iphone
If I connect my iphone to my mac, it automatically shows up on the locations in the Aperture import menu. However, I want to import some photos from a friend's iphone and when I connect it to y mac, it will not "find" that iphone. How can I import
-
Want to develop a booking calender in oracle XE- Step by step process
I want to develop a booking calendar for meeting rooms, where a person should be able insert time (from and til) and able to view available rooms at that particular time. In application (Page 1) it should show registration form with following insert
-
In process rejection of raw materials
Dear Experts, My client is having 01 and 04 type inspection active, now he want that when doing production while issuing goods to production if he found some raw materials of poor quality then they should be return to vendor, how i can map this