List Partition performance

I'm attempting to address some performance issues by using list partitioning (10g running on Windows Server 2003). As an experiment I created two small tables (~1000 rows) of vehicle maintenance data, one with no partitions the other partitioned by vehicle type:
create table myschema.mynewtable
tablespace mynewtablespace
parallel ( degree default )
nologging
monitoring
partition by list (vehicle_type) (
partition TRUCK values ('truck'),
partition CAR values ('car'),
partition SUV values ('suv'),
partition VAN values ('van')) as
select * from myschema.myoldtable;
Problem is that queries into the partitioned table take approx. twice as long to complete as compared to the non-partitioned table. Am I missing something here?
I also get the the following error when I view the table using the enterprise manager:
"Only range partitioned tables are supported in the current version"
As I stated before I am using 10g on Windows Server 2003.
Thanks in advance!

Could you possibly compare the execution plans with and without the list partition? Are the stats recent? Looks like the EM doesn't support yet list partitioning, since this feature is so new (sorry, can't try this myself, don't have EM currently).
Daniel

Similar Messages

  • How to make use of a list partition key in an IR?

    Hi all -- wondering if anyone has any thoughts on the following:
    I have a table like this:
    CREATE TABLE protocol (
    ptl_id INTEGER,
    ptl_name VARCHAR2(100),
    and this table is LIST partitioned on the key value PTL_ID. (There are many reasons for this need which I won't go into).
    My question is, queries that use this table in Interactive Reports I have always have the PTL_ID in them, but it's never a displayed column, it's always hidden (as it's a meaningless surrogate key, not to display to the user). However the default IR behavior, when filtering, won't use it, it will use PTL_NAME (if filtering on a particular PROTOCOL).
    What can I do to make the IR use the list partition key PTL_ID instead of PTL_NAME, even though PTL_ID is hidden and PTL_NAME is displayed? I'd get MUCH better performance if I could get it to query via the list partition key.
    Any thoughts??
    Thanks!
    David

    Users can change the name of the protocol at will, so that is not an option. Switching the partitioning is not an option either, as the PTL_ID's/partitions get pre-created during scheduled maintenance, and there is no tolerance to downtime to create a new partition for every new protocol as they are needed.
    Each partition is put in a separate tablespace as there is a need to archive off protocols once they are done.
    So I'm back to the original question still. My guess is the answer involves a bunch coding work arounds, not something native in the IRs. I figured I'd ask.
    Thanks
    David

  • List partitioning multi-org tables

    Hi
    I am doing list partitioning on receivables multi-org tables on org_id column. Running into a performance problem with multi org views. The multi-org views for receivables tables are defined like below with a nvl condition on org_id (partitioned column) in their where clause
    create or replace ra_customer_trx
    select select * from ra_customer_trx_all
    WHERE NVL(ORG_ID,NVL(TO_NUMBER(DECODE(SUBSTRB(USERENV ('CLIENT_INFO'),1,1), ' ', NULL, SUBSTRB(USERENV ('CLIENT_INFO'),1,10))),-99)) = NVL(TO_NUMBER(DECODE(SUBSTRB(USERENV ('CLIENT_INFO'),1,1), ' ', NULL, SUBSTRB(USERENV ('CLIENT_INFO'),1,10))),-99)
    Queries against the view are doing all partition scan when I exptected partition pruning to kick in and the query goes only against the spefific partition.
    select count(1) from ra_customer_trx ---- does all partition scan
    select count(1) from ra_customer_trx_all where org_id = <> ---- does single partition scan, works well.
    When I recreate the view with out any function calls on the org_id column partition pruning happens.
    In a non partitioned environment which has an index on org_id column, both the above sqls use the index and yield same result.
    So my questions are -
    1. Is there a way to get around this problem without having to modify the oracle supplied multi-org views? Any options I can supply in the partition script?
    2. In a non-partitioned env, with an index on org_id how is the optmizer able to go against the index and where as it is not able to in partitioned environment..? Both these envs has the same view definition with NVL(org.......) consition.
    Does anyone have any suggestions?
    Thank you.

    user2317378 wrote:
    1. Is there a way to get around this problem without having to modify the oracle supplied multi-org views? Any options I can supply in the partition script?You mean to say that the expression used in the view belongs to some Oracle supplied schema, like APPS? Or is this a view you've created yourself?
    Can you show us the output of EXPLAIN PLAN using DBMS_XPLAN.DISPLAY when querying the view? Use the \ tag before and after to use proper formatting in fixed font.
    Please make sure that the "Predicate Information" section below the plan is also included in your post. If it is missing your plan table is old and needs to be upgraded using $ORACLE_HOME/rdbms/admin/utlxplan.sql or dropped if you're in 10g which provides a system wide PLAN_TABLE.
    2. In a non-partitioned env, with an index on org_id how is the optmizer able to go against the index and where as it is not able to in partitioned environment..? Both these envs has the same view definition with NVL(org.......) consition.
    These are two different questions. One is about partition pruning not taking place, the other one about an index not being used.
    Can you show us the output of EXPLAIN PLAN using DBMS_XPLAN.DISPLAY when querying the unpartitioned example? Use the \ tag before and after to use proper formatting in fixed font.
    Please make sure that the "Predicate Information" section below the plan is also included in your post. If it is missing your plan table is old and needs to be upgraded using $ORACLE_HOME/rdbms/admin/utlxplan.sql or dropped if you're in 10g which provides a system wide PLAN_TABLE.
    It would be interesting to know how Oracle can use the index given the complex expression in the WHERE clause.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Splitting List partition

    Hi all,
    We are using oracle database (10.2.0.4 64bit) and OS AIX (6.1).
    We have list partition table. On column sale two values (1 or 0) are stored.
    Table has two partition DAILY_ISSUANCE_SALE_FACT_1  for value (1) and DAILY_ISSUANCE_SALE_FACT_0  for value  (0).
    Due to huge size of table, we want to split partition DAILY_ISSUANCE_SALE_FACT_1 and DAILY_ISSUANCE_SALE_FACT_0.
    How I can splite these two partitions with values 1 and 0?

    We are using oracle database (10.2.0.4 64bit) and OS AIX (6.1).
    We have list partition table. On column sale two values (1 or 0) are stored.
    Table has two partition DAILY_ISSUANCE_SALE_FACT_1  for value (1) and DAILY_ISSUANCE_SALE_FACT_0  for value  (0).
    Due to huge size of table, we want to split partition DAILY_ISSUANCE_SALE_FACT_1 and DAILY_ISSUANCE_SALE_FACT_0.
    How I can splite these two partitions with values 1 and 0?
    You can't - a list partition whose definition only specifies one value cannot be split. If you have specified a DEFAULT partition for the table you can split that default partition but that won't affect the two partitions that you mentioned.
    You could also add a new partition but that won't affect those two partitions either.
    See the 'Maintaining Partitions' section of the VLDB and Partitioning Guide
    http://docs.oracle.com/cd/E18283_01/server.112/e16541/part_admin002.htm#i1007318
    That section has details and examples of how to add/split partitions.
    Due to huge size of table, we want to split partition
    Why? What are you trying to accomplish? What difference does it make if the table is 'huge'? Can you tell us precisely when the table became huge? Does that mean that the day before it was not huge but that now it is?
    Large tables are generally partitioned to either improve performance of queries or to improve the performance of maintenance operations (e. g. delete/remove older data, add new daily data).
    What PROBLEM are you trying to solve? Post info (query, execution plan, etc - see the FAQ for how to post a tuning request) that demonstrates the problem you think you have and we can help you solve it.

  • Domain index on list-partitioned table?

    Hi,
    I have a list-partitioned table, and wanted to create a partitioned Oracle Text index on it. I keep getting an error, and am now wondering if it's possible to do. Here is my syntax:
    CREATE INDEX SCHEMA1.IDX_ALL_TEXT_LOCAL ON SCHEMA1.TABLE1(ALL_TEXT)
    INDEXTYPE IS CTXSYS.CONTEXT
    LOCAL
    (PARTITION PTN1 PARAMETERS('sync (on commit) storage ptn1'),
    PARTITION PTN2 PARAMETERS('sync (on commit) storage ptn2'),
    PARTITION PTN3 PARAMETERS('sync (on commit) storage ptn3'),
    PARTITION PTN4 PARAMETERS('sync (on commit) storage ptn4'),
    PARTITION PTN5 PARAMETERS('sync (on commit) storage ptn5'),
    PARTITION PTN6 PARAMETERS('sync (on commit) storage ptn6'),
    PARTITION PTN7 PARAMETERS('sync (on commit) storage ptn7'),
    PARTITION PTN8 PARAMETERS('sync (on commit) storage ptn8')
    PARAMETERS('section group my_group lexer new_lexer');
    ERROR at line 1:
    ORA-29850: invalid option for creation of domain indexes
    Any advice would be much appreciated.
    Thanks,
    Nora

    ... will it spread the index across the tablespaces that are associated with each partition?No, as demonstrated below.
    SCOTT@orcl_11gR2> CREATE TABLE table1
      2       ( id         NUMBER(6),
      3         all_text      VARCHAR2 (20)
      4       )
      5  PARTITION BY LIST (id)
      6   (PARTITION ptn1 VALUES (2,4) TABLESPACE example,
      7    PARTITION ptn2 VALUES (3,9) TABLESPACE example
      8   )
      9  /
    Table created.
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO table1 VALUES (2, 'test2')
      3  INTO table1 VALUES (3, 'test3')
      4  INTO table1 VALUES (4, 'test4')
      5  INTO table1 VALUES (9, 'test9')
      6  SELECT * FROM DUAL
      7  /
    4 rows created.
    SCOTT@orcl_11gR2> CREATE INDEX IDX_ALL_TEXT_LOCAL
      2  ON TABLE1 (ALL_TEXT)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  /
    Index created.
    SCOTT@orcl_11gR2> SELECT table_name, tablespace_name
      2  FROM   user_tab_partitions
      3  WHERE  table_name = 'TABLE1'
      4  /
    TABLE_NAME                     TABLESPACE_NAME
    TABLE1                         EXAMPLE
    TABLE1                         EXAMPLE
    2 rows selected.
    SCOTT@orcl_11gR2> SELECT table_name, tablespace_name
      2  FROM   user_tables
      3  WHERE  table_name LIKE '%IDX_ALL_TEXT_LOCAL%'
      4  /
    TABLE_NAME                     TABLESPACE_NAME
    DR$IDX_ALL_TEXT_LOCAL$I        USERS
    DR$IDX_ALL_TEXT_LOCAL$R        USERS
    DR$IDX_ALL_TEXT_LOCAL$N
    DR$IDX_ALL_TEXT_LOCAL$K
    4 rows selected.
    SCOTT@orcl_11gR2>

  • Spatial Index on list partition?

    Wondering if anyone has created a spatial index on a table that has a list partition. Documentation says only a range partition is supported.
    Also, when creating the partition, has anyone created the partitions in parallel? i.e. hohup a gang of jobs that work on each partition.

    Hi Steven,
    Oracle spatial partitioned indexing does not support list partitions.
    Also, parallel spatial indexing is supported as of Oracle 9iR2, but the
    parallelism implemented for partitioned indexing is partition-at-a-time
    parallelism, i.e. partition 1 is indexed in parallel, then partition 2, etc.
    Also implemented in 9iR2 is exchange partition, which allows you to
    build the partitions for each index separately in parallel, then exchange
    them in with very high index availability.
    Hope this helps,
    Dan

  • Can we list subpartition in list partition

    Hi All,
    Can i have a list partition in a list subpartition. If we can plz help me with the syntax of list-list partition.
    Thanks,
    Ashok

    Thank You Wills. The requirement is the users want to change the mappings in the partition script, but users are not having any access to the EAS. They want the mappings to be dynamically changed in the partition script on adhoc basis.
    Admin can change the values to the substituion variables, but the requirement is users wants to change the mappings.
    So they asked for the parameter file.

  • Materialized View Log - Compress Clause for List Partition

    Hi All,
    In Syntax diagram it states that Compress Clause for List Partition of Materialized View Log is valid , but when we run any script with compress clause for list partition on Materialized view log then Database throws error as ORA-14020: this physical attribute may not be specified for a table partition
    So in any chance we can have the compress clause for the partition of materialized view log.
    Thanks in advance,
    Manu.

    The "CREATE MATERIALIZED VIEW LOG" syntax refers to the "Table Partitioning" section of the CREATE TABLE documentation.
    The "Table Partitioning" section refers to "table_partition_description" which then refers to "table_compression". "table_compression" then states that you can specify compression for entire table in the physical_properties clause and for range partition / list partition in the "table_partition_description". The Restrictions section on Table Compression says "You cannot define table compression explicitly for hash partitions or hash and list subpartitions" which implies that you can define partition for list partitions.
    Moreover, error 14020 lists valid options for Range or Composite Range and for Hash partitoins -- which implies that all other Table physical attributes are applicable for List partitions. (But then, is Compression a physical attribute -- it is really part of "physical properties" not "physical attributes").
    I think that the documentation isn't explicit enough and needs to be fixed.
    N.B : Referencing the 10.2 documentation.
    Hemant K Chitale
    Edited by: Hemant K Chitale on Feb 1, 2010 4:12 PM

  • List Partition

    I am creating list partition table using the following script
    Create table emp(empname varchar2(25), empno number,state varchar2(25)
    partition by list(state)
    (partition p1 value('Kar'),
    partition p2 value('Tamilnadu'));
    Now i want to fetch kar data only how i can write select query
    Pls anyone help me
    Thanks in advance

    I am creating the below partition table
    CREATE TABLE NOTFN
    NOTFN_ID INTEGER NOT NULL,
    VALDTN_TYPE VARCHAR2(50),
    VALDTN_TITLE VARCHAR2(255),
    VALDTN_DESC VARCHAR2(4000),
    NOTIFCATION_TM DATE,
    STATUS CHAR(1),
    GMID CHAR(6) NOT NULL,
    ARCHIVED CHAR(1) NOT NULL
    PARTITION BY LIST (ARCHIVED)
    PARTITION NOTFN_ARCHIVED VALUES ('y')
    LOGGING,
    PARTITION NOTFN_NOTARCHIVED VALUES ('N')
    LOGGING
    NOCACHE
    NOPARALLEL
    MONITORING;
    and i am inserting two rows
    INSERT INTO NOTFN ( NOTFN_ID, VALDTN_TYPE, VALDTN_TITLE, VALDTN_DESC, NOTIFCATION_TM, STATUS,GMID, ARCHIVED )
    VALUES ( 1, 'current', 'notifications', 'its good', TO_Date( '01/20/0001 07:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM') , '1', '15 ', 'y');
    INSERT INTO NOTFN ( NOTFN_ID, VALDTN_TYPE, VALDTN_TITLE, VALDTN_DESC, NOTIFCATION_TM, STATUS, GMID, ARCHIVED )
    VALUES ( 2, 'archive', 'task', 'scen', TO_Date( '01/07/0010 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM') , '2', '15 ', 'N');
    Now i want to update one row like
    update notfn set archived='Y' where notfn_id=2 and gmid='15'
    then i got the following error
    ORA-14402: updating partition key column would cause a partition change
    how i can update ? pls help me
    Thanks in advance

  • HASH PARTITION TO LIST PARTITION

    version : Oracle 10g
    hi All,
          i have a table partitioned by hash(8 segments) with 200 millions records . now we want to move to list partition the same table by state.
          Is there a way to drop hash Partitions with out losing the data, and Add list partition.
        

    No, you can't "convert" the Hash Partitions to List Partitions.
    You have to create a new, empty, table that is List Partitioned and then move the data over to the new table.
    You could use Direct Path Insert (i.e. INSERT with APPEND Hint) with PARALLEL degree and NOLOGGING on the target table to speed up the copy.
    You could also use DBMS_REDEFINITION to migrate the data.
    In either case, you also have to create the Indexes on the new table.
    Hemant K Chitale

  • Hash partitioning v. list partitioning on surrogate key + partition pruning

    Hi,
    Have a large fact table with surrogate keys, therefore queries are of form
    select dimension.attribute..
    from fact, dima, dimb..
    where facta.dima_surrogate_key = dima.dimension_key
    and facta.dimb_surrogate_key = dimb.dimension_key
    and dima.attribute = <value>
    and dimb.attribute = <value>
    Would ideally like partition pruning to happen but will this happen if hash partition on facta.surrogate_key
    Likewise could list partition on facta.dima_surrogate_key and further sub-partition on hash of factb.dima_surrogate_key.
    Any advice much appreciated.

    user5716448 wrote:
    Hi,
    Version 11.2.0.1
    fact table structure
    PRODUCT_ID NUMBER
    RETAILER_ID NUMBER
    OUTLET_ID NUMBER
    CALENDAR_ID NUMBER
    BRANCH_ID NUMBER
    PUBLISHER_ID NUMBER
    DISTRIBUTOR_ID NUMBER
    TRANS_TYPE_ID NUMBER
    TRANS_QTY NUMBER (10)
    TRANS_VALUE (10,4)
    No date on fact table (just surrogate_id for calendar whihc links to calendar/date dimension.
    Although queries can be by date of transaction, most aren't.
    Potential to grow to 3 billion rows.
    Considering hash partitioning on the product_id, simply to break data down and product_id is the largest dimension.About hash partitioning – in this case it is probably all about the ability to run in parallel. Do not have any info on that, so I cannot comment further.
    >
    sqls are varied, lots of different types some query all dimensions, sometimes a few. Not the straightforward date examples in the manual.You can pick a dimension that is frequently used by the SQLs. I understand that there is no perfect one, but even if you pick just a “good” one you might have a good deal of partition elimination.
    >
    Users run 3rd part ad-hoc reporting layer which has to allow them to report against the star in any way they want.
    Star transformation hint enabled. Have heard in deciding number of hash partitions, partition size should geneerally be < 2gb.
    e.g transactions for a given product for customers belonging to a given multiple in a given week
    select trans_qty, trans_value, m.prod_name, m.prod_num, r.cust_name, w.branch_name, rtt.trans_date, rtt,trans_type
    from retailer_transaction rt, media m, wholesaler w, calendar c, retailer r, trans_type rtt
    where rt.issue_id = m.dimension_key
    and m.prod_num = 600
    and rt.branch_id = w.dimension_key
    and rt.outlet_id = r.dimension_key
    and r.multiple_num = 700
    and rt.calendar_id = calendar.dimension_key
    and m.issue_year_week = 201110
    and rt.trans_type_id = rtt.dimension_keyLastly, you need to focus on weather and how to partition your indexes (I assume you have bunch of bitmaps). This decision is at least as important as partitioning the table.

  • ORA-14314: resulting List partition(s) must contain atleast 1 value

    Hi,
    Using: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production, Windows 7 Platform.
    I'm trying to understand Exchange Partition and Split (List) partitioning. Below is the code I'm trying to work on:
      CREATE TABLE big_table (
      id            NUMBER(10),
      created_date  DATE,
      lookup_id     NUMBER(10),
      data          VARCHAR2(50)
    declare
      l_lookup_id big_table.lookup_id%type;
      l_create_date date;
    begin
      for i in 1 .. 1000000 loop
        if mod(i,3) = 0 then
           l_create_date := to_date('19-mar-2011','dd-mon-yyyy');
           l_lookup_id := 2;
        elsif mod(i,2) = 0 then
           l_create_date := to_date('19-mar-2012','dd-mon-yyyy');
           l_lookup_id := 1;
        else
           l_create_date := to_date('19-mar-2013','dd-mon-yyyy');
           l_lookup_id := 3;
        end if;
        insert into big_table(id, created_date, lookup_id, data)
           values (i, l_create_date, l_lookup_id, 'This is some data for '||i);
      end loop;
      commit;
    end;
    alter table big_table add (
    constraint big_table_pk primary key (id));
    exec dbms_stats.gather_table_stats(user, 'BIG_TABLE', cascade => true);
    create table big_table2 (
    id number(10),
    created_date date,
    lookup_id number(10),
    data varchar2(50)
    partition by list (created_date)
    (partition p20991231 values (TO_DATE(' 2099-12-31 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')));
    alter table big_table2 add (
    constraint big_table_pk2 primary key(id));
    alter table big_table2 exchange partition p20991231
    with table big_table
    without validation
    update global indexes;
    drop table big_table;
    rename big_table2 to big_table;
    alter table big_table rename constraint big_table_pk2 to big_table_pk;
    alter index big_table_pk2 rename to big_table_pk;
    exec dbms_stats.gather_table_stats(USER, 'BIG_TABLE', cascade => TRUE);
    I'm trying to split the data by moving created_date=19-mar-2013 to new partition p20130319. I tried to run the below query but failed with error. Where am I doing it wrong?
    Thanks.
    alter table big_table
    split partition p20991231 values (to_date('19-mar-2013','dd-mon-yyyy'))
    into (partition p20130319
         ,partition p20991231
    Error report:
    SQL Error: ORA-14314: resulting List partition(s) must contain atleast 1 value
    14314. 00000 -  "resulting List partition(s) must contain atleast 1 value"
    *Cause:    After a SPLIT/DROP VALUE of a list partition, each resulting
               partition(as applicable) must contain at least 1 value
    *Action:   Ensure that each of the resulting partitions contains atleast
               1 value

    I stand corrected.
    Below are the steps I have gone through to understand:
    1. How to partition a table with data in it.
    2. Exchange partition.
    3. Split partition (List).
    4. Split data to more than 2 partitions.
    Please correct me if I'm missing anything.
    CREATE TABLE big_table
        id           NUMBER(10),
        created_date DATE,
        lookup_id    NUMBER(10),
        data         VARCHAR2(50)
    DECLARE
      l_lookup_id big_table.lookup_id%type;
      l_create_date DATE;
    BEGIN
      FOR i IN 1 .. 1000000
      LOOP
        IF mod(i,3)= 0 THEN
          l_create_date := to_date('19-mar-2011','dd-mon-yyyy');
          l_lookup_id   := 2;
        elsif mod(i,2)   = 0 THEN
          l_create_date := to_date('19-mar-2012','dd-mon-yyyy');
          l_lookup_id   := 1;
        ELSE
          l_create_date := to_date('19-mar-2013','dd-mon-yyyy');
          l_lookup_id   := 3;
        END IF;
        INSERT INTO big_table(id, created_date, lookup_id, data)
          VALUES(i, l_create_date, l_lookup_id, 'This is some data for '||i);
      END LOOP;
      COMMIT;
    END;
    ALTER TABLE big_table ADD
    (CONSTRAINT big_table_pk PRIMARY KEY (id));
    EXEC dbms_stats.gather_table_stats(USER, 'BIG_TABLE', CASCADE => true);
    CREATE TABLE big_table2
      ( id           NUMBER(10),
        created_date DATE,
        lookup_id    NUMBER(10),
        data         VARCHAR2(50)
      partition BY list(created_date)
      (partition p0319 VALUES
        (TO_DATE(' 2013-03-19 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') ,TO_DATE(' 2012-03-19 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') ,TO_DATE(' 2011-03-19 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    ALTER TABLE big_table2 ADD
    (CONSTRAINT big_table_pk2 PRIMARY KEY(id));
    ALTER TABLE big_table2 exchange partition p0319
    WITH TABLE big_table without validation
    UPDATE global indexes;
    DROP TABLE big_table;
    RENAME big_table2 TO big_table;
    ALTER TABLE big_table RENAME CONSTRAINT big_table_pk2 TO big_table_pk;
    ALTER INDEX big_table_pk2 RENAME TO big_table_pk;
    EXEC dbms_stats.gather_table_stats(USER, 'BIG_TABLE', CASCADE => TRUE);
    SELECT p.partition_name, p.num_rows
    FROM user_tab_partitions p
    WHERE p.table_name = 'BIG_TABLE';
    ALTER TABLE big_table split partition p0319 VALUES
    (TO_DATE(' 2013-03-19 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    INTO (partition p20130319, partition p0319);
    ALTER INDEX big_table_pk rebuild;
    EXEC dbms_stats.gather_table_stats(USER, 'BIG_TABLE', CASCADE => TRUE);
    SELECT p.partition_name, p.num_rows
    FROM user_tab_partitions p
    WHERE table_name = 'BIG_TABLE';
    SELECT DISTINCT created_date FROM big_table partition(p20130319);
    SELECT DISTINCT created_date FROM big_table partition(p0319);
    ALTER TABLE big_table split partition p0319 VALUES
    (TO_DATE(' 2012-03-19 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    INTO (partition p20120319, partition p20110319);
    ALTER INDEX big_table_pk rebuild;
    EXEC dbms_stats.gather_table_stats(USER, 'BIG_TABLE', CASCADE => TRUE);
    SELECT p.partition_name, p.num_rows
    FROM user_tab_partitions p
    WHERE table_name = 'BIG_TABLE';
    SELECT DISTINCT created_date FROM big_table partition(p20130319);
    SELECT DISTINCT created_date FROM big_table partition(p20120319);
    SELECT DISTINCT created_date FROM big_table partition(p20110319);

  • Is list partition and hash partition one and the same

    I am creating table with partition with the commands
    CREATE TABLE ABD (ENO NUMBER(5),CID NUMBER(3),ENAME VARCHAR2(10))
    PARTITION BY LIST (ENO)
    (PARTITION P1 VALUES (123),
    PARTITION P2 VALUES (143),
    PARTITION CLIENT_ID VALUES (746))
    ALTER TABLE ABD
    ADD PARTITION CLIENT_756 VALUES (756)
    but when i describe the table script it is showing like this
    CREATE TABLE ABD (
    ENO NUMBER (5),
    ENAME VARCHAR2 (10),
    CID NUMBER (3) )
    PARTITION BY HASH (ENO)
    PARTITIONS 4
    STORE IN ( USERS,USERS,USERS,
    USERS);
    actually i am creating list partition but it is showing hash partition why is it so?

    when i describe the table script it is showing like thisHow do you describe it, and which version are you on ?
    TEST@db102 SQL> CREATE TABLE ABD (ENO NUMBER(5),CID NUMBER(3),ENAME VARCHAR2(10))
      2  PARTITION BY LIST (ENO)
      3  (PARTITION P1 VALUES (123),
      4  PARTITION P2 VALUES (143),
      5* PARTITION CLIENT_ID VALUES (746))
    TEST@db102 SQL> /
    Table created.
    TEST@db102 SQL> ALTER TABLE ABD
      2* ADD PARTITION CLIENT_756 VALUES (756)
    TEST@db102 SQL> /
    Table altered.
    TEST@db102 SQL> select dbms_metadata.get_ddl('TABLE','ABD','TEST') from dual;
    DBMS_METADATA.GET_DDL('TABLE','ABD','TEST')
      CREATE TABLE "TEST"."ABD"
       (    "ENO" NUMBER(5,0),
            "CID" NUMBER(3,0),
            "ENAME" VARCHAR2(10)
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(
      BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"
      PARTITION BY LIST ("ENO")
    (PARTITION "P1"  VALUES (123)
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS" NOCOMPRESS ,
    PARTITION "P2"  VALUES (143)
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS" NOCOMPRESS ,
    PARTITION "CLIENT_ID"  VALUES (746)
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS" NOCOMPRESS ,
    PARTITION "CLIENT_756"  VALUES (756)
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS" NOCOMPRESS )
    TEST@db102 SQL>                                                                               

  • CREATING A LIST PARTITION WITH TO_CHAR FUNCTION

    i want to create a list partitions based on months like 1..12 so that data will go to its respective month partition irrespective of Month and year. i don't have a varchar2 field for month only rather i have got the insertion date column. can anybody tell me how can i create a list partitioned table by using the to_char(date_column,'MON') function.

    Range partition means every month one new partition if i go for month wise partition. So, thats final right we cannot use any function to create any list partitions??

  • Hide particular data in the tasks list in performance management

    Hi,
    I'm trying to hide transfer scorecard task from task list in performance management page in Manager self service.
    I tried by extending that view object and I added where clause additionally to hide that row. But i got sqlexception error.
    So i revert back the vo extension and i tried by extending the controller and added where clause after
    super.processRequest(oapagecontext, webbean);
    <added whereclause to hide particular record>
    but still I'm getting that sqlexception error.
    Any suggestions please.
    Thanks in advance,
    SAN

    You can do that by simply sorting the alv display by <b>object type</b>, all the data after that will be group according to its object type and the object type will only be printed once.
    You can make a varian inthe ALV and call it on your code, or insert the code with this (if you use function module for creating ALV):
    information for sort and subtotals
    types: begin of slis_sortinfo_alv,
           spos(2) type n,
             spos like alvdynp-sortpos,
             fieldname type slis_fieldname,
             tabname type slis_fieldname,
           up(1) type c,
           down(1) type c,
           group(2) type c,
           subtot(1) type c,
             up like alvdynp-sortup,
             down like alvdynp-sortdown,
             group like alvdynp-grouplevel,
             subtot like alvdynp-subtotals,
             comp(1) type c,
             expa(1) type c,
             obligatory(1) type c,
           end of slis_sortinfo_alv.
    DATA: l_v_sort TYPE slis_sortinfo_alv.
      REFRESH: ta_fieldcat, ta_sort.
      v_layout-zebra = 'X'.
      v_layout-colwidth_optimize = 'X'.
      l_v_sort-fieldname = 'OBJECTTYPE'.
      l_v_sort-spos      = 1.
      l_v_sort-up        = 'X'.
      l_v_sort-subtot    = 'X'.
      APPEND l_v_sort TO ta_sort.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = v_repid
          is_layout          = v_layout
          it_fieldcat        = ta_fieldcat[]
          <b>it_sort            = ta_sort[]</b>
          it_events          = ta_events[]
          is_sel_hide        = wa_selcrit
          i_save             = 'A'
          is_variant         = spec_layout
        TABLES
          t_outtab           = ft_output
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
      IF sy-subrc NE 0.
        EXIT.
      ENDIF.
    Regards,
    -don-

Maybe you are looking for