Partition name selection

hi
i have a table tab1 with 10 partitions, and partition key being year , and partition names goes like year0304, year0405 and so on....
can i use SELECT STATEMENT in which the keyword PARTITION(PARTITION_NAME) be substituted dynamically , by intializing it to some variable like
part := 'PARTITION('||PART_YEAR||')';
where PART_YEAR is a variable which gets value through some function as year0304, year0405.....
And ultimately using it as
sql> select * from tab1 part where x =something;
i did tried but the query is treating the PART as some table alias.
any suggestions, pls help me
regards
srinivas

If the object is analyzed and predicate demands it, Oracle will automatically use the required partition.
In the example below Oracle automatically uses the correct partition based on the predicate (look at Pstart and Pstop columns):
SQL> create table part(
  2   part_key varchar2(10))
  3  partition by range
  4  (part_key)
  5  (partition part_#1 values less than ('C'),
  6   partition part_#2 values less than ('H'),
  7   partition part_#3 values less than ('Z'),
  8   partition part_#4 values less than (MAXVALUE)
  9  )
10  /
Table created.
SQL> BEGIN
  2      FOR idx IN ascii('A') .. ascii('Z')
  3      LOOP
  4          INSERT INTO part VALUES (chr(idx));
  5      END LOOP;
  6  END;
  7  /
PL/SQL procedure successfully completed.
SQL>
SQL> analyze table part compute statistics for table for all indexes for all indexed columns ;
Table analyzed.
SQL>
SQL> explain plan for select * from part where part_key = 'G' ;
Explained.
SQL> @?\rdbms\admin\utlxpls
PLAN_TABLE_OUTPUT
| Id  | Operation            |  Name       | Rows  | Bytes | Cost  | Pstart| Pstop |
|   0 | SELECT STATEMENT     |             |     1 |     5 |     2 |       |       |
|*  1 |  TABLE ACCESS FULL   | PART        |     1 |     5 |     2 |     2 |     2 |
Predicate Information (identified by operation id):
PLAN_TABLE_OUTPUT
   1 - filter("PART"."PART_KEY"='G')
Note: cpu costing is off
14 rows selected.
SQL>

Similar Messages

  • Partition Name in Select and Group-By

    Is there a function that returns the partition name a row is stored in? I'd like to use it in a SELECT statement, if it exists.
    The goal is to get row counts per partition to determine skew on a hash-based partition (otherwise, I'd just select and group-by the partition key). I want to do something like this:
    SELECT PARTITION_NAME, COUNT(*) as PER_PART_COUNT
      FROM SOMETABLE
    GROUP BY PARTITION_NAME;Obviously, I would replace the string "*PARTITION_NAME*" with whatever function returns that value.
    NOTE: Before the forum sharks jump all over me, I did search the documentation and forums, but I came up empty handed.

    Hi,
    This is hokey - but you can use the undocumented function "tbl$or$idx$part$num" like so:
    SELECT   atp.partition_name
           , COUNT (*) AS count_rows
        FROM all_tab_partitions atp
           , (SELECT tbl$or$idx$part$num ("SCOTT"."TAB1"
                                        , 0
                                        , 1
                                        , 0
                                        , partition_col1 -- your 1st partition key column
                                        , partition_col2 -- your 2nd partition key column
                                         ) AS part_num
                   , 'TAB1' AS table_name
                   , 'SCOTT' AS owner
                FROM scott.tab1) pt
       WHERE atp.table_name = pt.table_name
         AND atp.table_owner = pt.owner
         AND atp.partition_position = pt.part_num
    GROUP BY atp.partition_name;Note - this probably won't perform well at all... but it could be an option...
    Message was edited by:
    PDaddy
    ... On 2nd thought - don't do it - it seems it is pretty unstable - brought my session to a halt a couple of times... Forget I mentioned it :)
    ... On 3rd thought - if you add ROWNUM - it works fine - seems you need to materialize the result set in the inner query - like so:
    CREATE TABLE part_tab (part_key int
                         , a int
    partition by range (part_key)
    (partition p1 values less than (100)
    ,partition p2 values less than (200)
    ,partition p3 values less than (maxvalue)
    insert into part_tab
    select rownum
         , rownum
    FROM all_objects
    where rownum <= 1000; SELECT atp.partition_name
         , COUNT(*) AS count_rows
    FROM all_tab_partitions atp
       , (SELECT TBL$OR$IDX$PART$NUM("PART_TAB", 0, 1, 0, part_key) AS part_num
               , 'PART_TAB' AS table_name
               , user AS owner
               , ROWNUM AS rn -- Materialize the result set by adding ROWNUM...
          FROM part_tab) pt
    WHERE atp.table_name = pt.table_name
      AND atp.table_owner = pt.owner
      AND atp.partition_position = pt.part_num
    GROUP BY atp.partition_name;

  • Call Data in Variable in Stored Procedure for Partition Name

    Hi,
    Here is an excerpt from a Srored Proc I have written.
    The aim here is to copy data from a partition of a table.
    I first query the partition-name from the ALL_TAB_PARTITIONS table and store the same in a VARCHAR2 variable named partition_name_low.
    I then try to select the data in this partition of the table by using the variable name.
    PROCEDURE purging AS
    partition_name_low VARCHAR2(25);
    BEGIN
    --+
    -- Query for the Highest Value of the timestamp in the 1st partition in current table.
    --+
    SELECT PARTITION_NAME
    INTO partition_name_low
    FROM ALL_TAB_PARTITIONS
    WHERE TABLE_NAME = 'TABLE1' AND PARTITION_POSITION IN
    +(+
    SELECT MIN(PARTITION_POSITION)
    FROM ALL_TAB_PARTITIONS
    WHERE TABLE_NAME = 'TABLE1'
    +);+
    COMMIT;
    COMMIT;
    DBMS_OUTPUT.PUT_LINE(partition_name_low ||' **********  ' || TO_char(sysdate, 'MM/DD/YYYY HH24:MI:SS')||' Starting Purging Data  *********');
    --+
    -- Copy data from 1st partition to Archive Table
    --+
    INSERT /* APPEND */ INTO TABLE1_ARCHIVE+
    SELECT * FROM TABLE1 PARTITION(partition_name_low);
    However, I am facing an issue here since I keep on gettin an error that "ORA-02149: Specified Partition does not exist".
    What I understand is that the Oracle query is picking up the literal string "partition_name_low", instead of the data inside it.
    I tried with
    &partition_name_low
    AND
    :partition_name_low
    with no luck.
    For the 2nd case I get the obvious exception "bad bind variable".
    Can someone please suggest in which way I can handle this situation where I can use a variable refer the partition name in a select query?
    Thanks in advance!!
    Abhishek.

    Hi,
    You have to use "execute immediate" to launch dynamic SQL command.
    So you should write
    execute immediate 'INSERT /* APPEND */ INTO TABLE1_ARCHIVE+
    SELECT * FROM TABLE1 PARTITION('||partition_name_low||')' ;
    Mike

  • Passing partition name as a variable

    hi all
    i'm trying to pass a variable as the partition name in my select query and getting the fallowing error.
    SQL> DECLARE
    2 PARTITION_NAME VARCHAR2(15) := 'PAR_JAN08';
    3 BEGIN
    4 SELECT * FROM TEST_T PARTITION('PARTITION_NAME');
    5 END;
    6 /
    SELECT * FROM TEST_T PARTITION('PARTITION_NAME');
    ERROR at line 4:
    ORA-06550: line 4, column 50:
    PL/SQL: ORA-00933: SQL command not properly ended
    ORA-06550: line 4, column 1:
    PL/SQL: SQL Statement ignored

    Check this -
    satyaki>
    satyaki>create or replace type pl_hok as object
    2   (
    3     GrA         varchar2(5),
    4     GrB         varchar2(5)
    5   );
    6  /
    Type created.
    satyaki>
    satyaki>
    satyaki>create or replace type pl_hok_rec as table of pl_hok;
    2  /
    Type created.
    satyaki>
    satyaki>
    satyaki>create or replace function pipe_sel(
    2                                         st_dt in date,
    3                                         en_dt in date
    4                                        )
    5  return pl_hok_rec pipelined
    6  is
    7    cursor c1
    8    is
    9      select distinct empno
    10      from emp
    11      where hiredate between st_dt and en_dt;
    12     
    13    r1 c1%rowtype;
    14     
    15    cursor c2
    16    is
    17      select distinct mgr
    18      from emp
    19      where hiredate between st_dt and en_dt;
    20     
    21    r2 c2%rowtype;
    22    pragma autonomous_transaction;
    23  begin
    24       open c1;
    25       open c2;
    26      
    27       loop
    28         fetch c1 into r1;
    29         fetch c2 into r2;
    30        
    31           exit when c1%notfound and c2%notfound;
    32           pipe row(pl_hok(to_char(r1.empno),to_char(r2.mgr)));
    33       end loop;
    34      
    35       close c2;
    36       close c1;
    37  
    38     return;
    39  exception
    40    when others then
    41      dbms_output.put_line(sqlerrm);
    42  end;
    43  /
    Function created.
    satyaki>
    satyaki>
    satyaki>select GrA,GrB from table(pipe_sel(to_date('01-jan-1980','dd-mon-yyyy'),to_date('20-aug-2007','dd-mon-yyyy')));
    GROUP GROUP
    7006  7369
    7369  7566
    7499  7698
    7521  7782
    7566  7788
    7654  7839
    7698  7902
    7782
    7788
    7839
    7844
    GROUP GROUP
    7876
    7900
    7902
    7934
    9898
    16 rows selected.
    satyaki>Hope this will give you some basic idea. Now, you have to convert your procedure into this kind of function.
    Regards.
    Satyaki De.

  • How to Find partition name by value ?

    hey,
    I have a big loading process into a certain fact table. the table is partitioned first by interval on a date column and then sub partitioned by hash. this is a big fact table so there are alot of bitmap indexes on it.
    i want to disable all indexes on a specific partition given a certain value of the partition key.
    is there any nice good looking way of finding the partition name by value ?
    i would realy like to avoid running a loop on the high_value long column in all_tab_partitions
    the etl process is running on the entire partition - after finding the partition name i would disable all sub partitions
    if i could only do something like...
    select $partition_name from some_table for (to_date('01/03/2012','dd/mm/yyyy'));i'm using oracle 11.2.0.2

    haki_benita wrote:
    now if we want to find the corresponding partition for a given value we need to check for the partition it's high value is greater then thy value and the previous one is lower then.Not necessarily. You can use the CBO to tell you what partition(s) will be used for a SQL statement. E.g.
    // partition range table using dates and yearly partitions
    SQL> create table testtab(
      2          id      number,
      3          day     date,
      4          flag    varchar2(1)
      5  )
      6  partition by range(day)
      7  (
      8          partition year_1900 values less than (TO_DATE('2000/01/01','yyyy/mm/dd')),
      9          partition year_2000 values less than (TO_DATE('2001/01/01','yyyy/mm/dd')),
    10          partition year_2001 values less than (TO_DATE('2002/01/01','yyyy/mm/dd')),
    11          partition year_2002 values less than (TO_DATE('2003/01/01','yyyy/mm/dd')),
    12          partition year_2003 values less than (TO_DATE('2004/01/01','yyyy/mm/dd')),
    13          partition year_2004 values less than (TO_DATE('2005/01/01','yyyy/mm/dd')),
    14          partition year_2005 values less than (TO_DATE('2006/01/01','yyyy/mm/dd')),
    15          partition year_2006 values less than (TO_DATE('2007/01/01','yyyy/mm/dd')),
    16          partition year_2007 values less than (TO_DATE('2008/01/01','yyyy/mm/dd')),
    17          partition year_2008 values less than (TO_DATE('2009/01/01','yyyy/mm/dd')),
    18          partition year_2009 values less than (TO_DATE('2010/01/01','yyyy/mm/dd')),
    19          partition year_2010 values less than (TO_DATE('2011/01/01','yyyy/mm/dd')),
    20          partition year_2011 values less than (TO_DATE('2012/01/01','yyyy/mm/dd')),
    21          partition year_2012 values less than (TO_DATE('2013/01/01','yyyy/mm/dd'))
    22  );
    Table created.
    // the following can be automated using PL/SQL - e.g. passing the date parameter to
    // a PL/SQL function and the function using the following approach to determine the
    // target partition
    SQL> explain plan
      2          set statement_id = 'partition.testtab.1' for
      3  select * from testtab where day = to_date( '2002/10/09','yyyy/mm/dd' );
    Explained.
    SQL> col PARTITIONS format a40
    SQL> select
      2          column_value    as PARTITIONS
      3  from       TABLE(
      4                  XmlSequence( extract(
      5                          DBMS_XPLAN.Build_Plan_Xml( 'PLAN_TABLE', 'partition.testtab.1' ),
      6                          '/plan/operation/partition'
      7                  )
      8                )
      9          );
    PARTITIONS
    <partition start="4" stop="4"/>
    <partition start="4" stop="4"/>
    SQL> select partition_name from user_tab_partitions where table_name = 'TESTTAB' and partition_position = 4;
    PARTITION_NAME
    YEAR_2002
    SQL>

  • Get table partition name dynamically for given date range

    Dear All,
    Could you please tell me how to get the partition name dynamicaly for given date range ?
    Thank you.

    SQL> select table_name,
           partition_name,
           to_date (
              trim (
                 '''' from regexp_substr (
                              extractvalue (
                                 dbms_xmlgen.
                                 getxmltype (
                                    'select high_value from all_tab_partitions where table_name='''
                                    || table_name
                                    || ''' and table_owner = '''
                                    || table_owner
                                    || ''' and partition_name = '''
                                    || partition_name
                                    || ''''),
                                 '//text()'),
              'syyyy-mm-dd hh24:mi:ss')
              high_value_in_date_format
      from all_tab_partitions
    where table_name = 'SALES' and table_owner = 'SH'
    TABLE_NAME                     PARTITION_NAME                 HIGH_VALUE_IN_DATE_FORMAT
    SALES                          SALES_1995                     01-JAN-96               
    SALES                          SALES_1996                     01-JAN-97               
    SALES                          SALES_H1_1997                  01-JUL-97               
    SALES                          SALES_H2_1997                  01-JAN-98               
    SALES                          SALES_Q1_1998                  01-APR-98               
    SALES                          SALES_Q2_1998                  01-JUL-98               
    SALES                          SALES_Q3_1998                  01-OKT-98               
    SALES                          SALES_Q4_1998                  01-JAN-99               
    SALES                          SALES_Q1_1999                  01-APR-99               
    SALES                          SALES_Q2_1999                  01-JUL-99               
    SALES                          SALES_Q3_1999                  01-OKT-99               
    SALES                          SALES_Q4_1999                  01-JAN-00               
    SALES                          SALES_Q1_2000                  01-APR-00               
    SALES                          SALES_Q2_2000                  01-JUL-00               
    SALES                          SALES_Q3_2000                  01-OKT-00               
    SALES                          SALES_Q4_2000                  01-JAN-01               
    SALES                          SALES_Q1_2001                  01-APR-01               
    SALES                          SALES_Q2_2001                  01-JUL-01               
    SALES                          SALES_Q3_2001                  01-OKT-01               
    SALES                          SALES_Q4_2001                  01-JAN-02               
    SALES                          SALES_Q1_2002                  01-APR-02               
    SALES                          SALES_Q2_2002                  01-JUL-02               
    SALES                          SALES_Q3_2002                  01-OKT-02               
    SALES                          SALES_Q4_2002                  01-JAN-03               
    SALES                          SALES_Q1_2003                  01-APR-03               
    SALES                          SALES_Q2_2003                  01-JUL-03               
    SALES                          SALES_Q3_2003                  01-OKT-03               
    SALES                          SALES_Q4_2003                  01-JAN-04               
    28 rows selected.

  • Partition name using wildcard

    hi everyone
    is it possible to query a certain partition only the name of the partition is specified with wilcard?
    something like this: select * from table partition(PART_CH_%9);
    comment: the full name of that partition is PART_CH_20121209

    >
    what i'm trying to achive eventually is to query a partition using a variable
    i mean that the partition name is through a variable
    i need that because it is part of an ETL process where all my source tables are partitioned with a date key as described above
    the last execution date is assigned into a variable through the ETL process
    what i want eventually to achieve is to query only the partition where the partition name is one day after the variable's value
    i'm using Data services utilty but that is note important because i use a standart SQL statement for that process
    anyway, what i need should look like this: select * from table partition($variable);
    >
    A query like 'select * from table partition($variable)' won't query the partition that is "one day after the variable's value".
    If the table is partitioned with a date key you don't need to use the partition name or dynamic sql. Just specify the date range you want in the WHERE.
    SELECT * FROM JOB_HISTORY
    WHERE START_DATE >= trunc(TO_DATE(&1, 'mm/dd/yyyy'),'dd')
       and START_DATE < trunc(TO_DATE(&1, 'mm/dd/yyyy'), 'dd') + 1;

  • Get Partition name using 'NLS_CALENDAR=GREGORIAN' shows incorrect year

    I'm trying to get the name of the partition which is the latest one. But using this sql I'm getting something not appropriate. It shows year as 2020 Any help is appreciated.
    SQL> alter session set nls_date_format='YYYY-MM-DD';
    Session altered.
    SQL> SELECT TO_CHAR(TO_DATE(MAX(SUBSTR(PARTITION_NAME, -6)), 'RRMMDD'), 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
    FROM DBA_TAB_PARTITIONS
    WHERE table_name= 'T_TEST'
    and table_owner = 'TEST'
    Output:
    TO_CHAR(TO_DATE(MAX(SUBSTR(PAR
    *2020*-09-06 00:00:00
    Structure of the table:
    CREATE TABLE TEST.T_TEST
    MESSAGE_ID VARCHAR2(60 BYTE) NOT NULL,
    MESSAGE_TYPE VARCHAR2(50 BYTE),
    LAST_CHANGE_DT TIMESTAMP(6),
    MESSAGE_TEXT CLOB,
    ACCOUNT_ID VARCHAR2(18 BYTE),
    EVENT_ID VARCHAR2(18 BYTE)
    TABLESPACE TOOLS
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    PARTITION BY RANGE (LAST_CHANGE_DT)
    PARTITION P_TEST_200904 VALUES LESS THAN (TIMESTAMP'2009-04-15 00:00:00')
    LOGGING
    NOCOMPRESS
    TABLESPACE TOOLS
    LOB (MESSAGE_TEXT) STORE AS
    ( TABLESPACE TOOLS
    ENABLE STORAGE IN ROW
    CHUNK 8192
    PCTVERSION 10
    NOCACHE
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    FREELISTS 1
    FREELIST GROUPS 1
    BUFFER_POOL DEFAULT
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    BUFFER_POOL DEFAULT
    PARTITION P_TEST_200905 VALUES LESS THAN (TIMESTAMP'2009-05-15 00:00:00')
    LOGGING
    NOCOMPRESS
    TABLESPACE TOOLS
    LOB (MESSAGE_TEXT) STORE AS
    ( TABLESPACE TOOLS
    ENABLE STORAGE IN ROW
    CHUNK 8192
    PCTVERSION 10
    NOCACHE
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    FREELISTS 1
    FREELIST GROUPS 1
    BUFFER_POOL DEFAULT
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    BUFFER_POOL DEFAULT
    PARTITION P_TEST_200906 VALUES LESS THAN (TIMESTAMP'2009-06-01 00:00:00')
    LOGGING
    NOCOMPRESS
    TABLESPACE TOOLS
    LOB (MESSAGE_TEXT) STORE AS
    ( TABLESPACE TOOLS
    ENABLE STORAGE IN ROW
    CHUNK 8192
    PCTVERSION 10
    NOCACHE
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    FREELISTS 1
    FREELIST GROUPS 1
    BUFFER_POOL DEFAULT
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    BUFFER_POOL DEFAULT
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;

    Hi,
    Why are you using 'RRMMDD' in your query when your partition name is like P_TEST_<RRRRMM>. This seems to be the issue.
    Regards
    Anurag Tibrewal.

  • Interval partitioning. How to choose partition name

    Hi all,
    Is there any wat to choose partition name when new partitions are created?
    I mean insted of "SYS_P101" something like CUSTOMRES_P_256 where 256 is the new value that caused the creation of the partition.
    The reason is that before running a long process I need to gather statistics on the partition based on that number
    Thanks in advance,

    You can rename a partition with your preferred naming convention:
    alter table CUSTOMER rename partition SYS_P101 to CUSTOMRES_P_256;But first you need to know the name of the partition. One thing I have used in cases when an interval partition has not been created yet is to insert a record with the new partition key value so that the interval partition is created, then get the partition name and then roll back the insert. This way you know the partition name in advance of any data loading.
    You can of course query dba_tab_partitions and look at the high_value column to select the correct partition. However, I prefer the following method of getting the partition name. It gives you the name of the partition for a row in a table. This is also useful for existing data (not just new partitions) if you ever need to find the partition where a certain row lives.
    select subobject_name
    into v_partition
    from ALL_OBJECTS
    where OWNER = 'SCHEMA_OWNER'
    AND data_object_id in (select dbms_rowid.rowid_object(rowid)
                                     from FACT_TABLE
                                     where PARTITION_KEY_COL = MY_VALUE
                                     and rownum = 1);You can then use the partition name to load your facts, gather statistics, or rename the partition.

  • Partition name length problem at DML in Table operator

    Hello experts
    In our datawarehouse we have a table with a high number of partitions (each partition corresponding to a different business object) for solving an issue with data quality. Every time the data quality mapping is run, a truncate on the corresponding partition is performed. But Insert operations on that table are not set on a particular partition and, therefore, lock the table and have a conflict with the truncates if parallel operations are run.
    We would like to used the Partition DML functionality at the Table Operator in order to insert just into one partition and prevent locking all of them. Although none of the partition names are longer than 30 characters, OWB (even at the GUI) adds the string "partition: " in front of each name, which causes the length limit to be surpassed.
    Any idea about how could we use this functionality without renaming the partitions?

    Hey there,
    I'm a colleague of the thread starter and like to jump in as this is an issue for us which we need to solve.
    Some more infos which might help:
    We are running the OWB 11.2.0.3.0 on Windows 32 Bit
    We have the following patches installed:
    13257502
    13473205
    None of the later patches has been installed, since none of the Bugs that were fixed affected us.
    In a Mapping on a table-Operator we'd like to use "PARTITION DML" for an Insert.
    On the GUI when selecting the Partition the data should be inserted to (Field: DML Partiton Name), we get the following error (in this instance the partition name is 24 characters long)
    "API0407: The minimum length of this filed is 0 and its maximum length is 32. You have 35 characters."
    In the Drop-down Menu of DML Partition Name it says "Partition: " in front of every partition there is. Together with a Partition name of 24 Characters it sums up to 35 characters.
    So it appears that the maximum length of the partition is limited to 21 characters only because "Partition: " is put in front of it.
    This error also appears when editing the Properties of the table operator by OMB*PLUS (from tcl) with
    OMBALTER MAPPING 'mapname' MODIFY OPERATOR 'operatorname' SET PROPERTIES (DML_PARTITION_NAME, DML_PARTITION_TYPE, PARTITION_KEY_VALUE_LIST, IS_PARTITION_INDEXED_BY_NAME) VALUES ('$partition', 'PARTITION', '$someEmptyList', 'true')
    where it does not make a difference whether $partition is of the form
    set partition "Partition: SOMEPARTITIONNAME"
    or
    set partition "SOMEPARTITIONNAME"
    Renaming the Partitions is not an option for us, since our warehouse is running in multiple productive systems and became quite large in the last years.
    Is it necessary, that "Partition: " is put infront of the partition name? Is there a way around this? Isn't the field DML_PARTITION_TYPE supposed to store the Information whether it is a partion or a subpartition?
    If you wanted to use subpartitions, does the name of the subpartition then need to be even shorter since "Subpartiton: " is put infront?
    Thanks in advance for any help or suggestions. If you need further Information, feel free to ask, I am more than happy to supply it.
    Best Regards
    Thorsten

  • Finding out partition number for a partition name

    I have Oracle 9.2.0.6 data warehouse.
    The FACT table is range partitioned.
    I have materialized views on the FACT table with dbms_mview.pmarker included in the materialized view select query. These are refresh on demand mviews.
    I have local bitmap indexes on all non-fact columns of the mviews.
    I can find out from user_tab_modifications as to which partitions on the base fact table have been modified since the last analyze. If I can convert the partition name to partition number (pmarker), I can make all bitmap index partitions corresponding to those partition numbers unusable and then refresh mviews and then rebuild the unusable index partitions.
    How can I convert the partition names to partition number (pmarker) without knowing a rowid.
    Thanks,
    Ravi

    I have Oracle 9.2.0.6 data warehouse.
    The FACT table is range partitioned.
    I have materialized views on the FACT table with dbms_mview.pmarker included in the materialized view select query. These are refresh on demand mviews.
    I have local bitmap indexes on all non-fact columns of the mviews.
    I can find out from user_tab_modifications as to which partitions on the base fact table have been modified since the last analyze. If I can convert the partition name to partition number (pmarker), I can make all bitmap index partitions corresponding to those partition numbers unusable and then refresh mviews and then rebuild the unusable index partitions.
    How can I convert the partition names to partition number (pmarker) without knowing a rowid.
    Thanks,
    Ravi

  • How can I specify the PARTITION name at the time of data load?

    Hi,
    I have a table with 4 partitions. By using SQL*Loader I'm going to load data into the same. While inserting the records it should go to the 2nd partition only.
    Where should i specify the Partition name?
    Please clarify me with sample code.
    Thanks.

    Assuming that the partition is empty before the load, I would load the data into a temp table with the same structure as the partitioned table. After all the data is successfully loaded, exchange the partition of the table with the temp table using 'alter table ... exchange partition...'
    Another question is, how is your table partitioned?
    Message was edited by:
    Jens Petersen

  • Identify partition name from input data

    Hi gurus,
    Pleae help for the below
    based on the input data i have to delete the partition from the table.
    suppose if a table PART  is partitioned based on the column id  number.  if my input data is 10 if it is present in the partition then i want to identifiy the partition_name.. 
    Please help  how to identify the partition name based on input data?
    Reply
    S

    You can query USER_TAB_PARTITIONS for PARTITION_NAME and PARTITION_POSITION against HIGH_VALUE.  Unfortunately, HIGH_VALUE is a LONG.
    Hemant K Chitale

  • Passing partition names

    We are having one requirement in which we need to pass the partition name of the table to the query.
    How can I pass the partition names or sub partition names for a query to an OWB mapping?
    Thanks!

    HI Can any body help in this..?
    I am facing the similar problem

  • Default partition name for Interval partitioned tables

    Hi ,
    Can we change the default partition names which are generated by Oracle.
    For Example :
    CREATE TABLE part_interval (
    id NUMBER,
    created_date DATE
    PARTITION BY RANGE (created_date)
    INTERVAL (NUMTOYMINTERVAL(1,'MONTH'))
    PARTITION part_01 values LESS THAN (TO_DATE('01-NOV-2007','DD-MON-YYYY'))
    Now if I insert values which doesn't fall in the 01-NOV-2007 date, a new partition is created like SYS_P43. Can I change this default partition name in the SQL statement itself . Not through procedures or functions.
    Regards,
    Raghunathan A
    Edited by: 869187 on Jun 29, 2011 6:08 AM

    869187 wrote:
    Hi ,
    Can we change the default partition names which are generated by Oracle. post SQL & results that show you can change partition names generated by YOU.

Maybe you are looking for

  • Trigger File Option in SFTP Advantco Sender Adapter

    Hi , What is the purpose of Trigger file option in sender SFTP adapter?When i enabled Advance selection for source file we have this functionality.Can i use this option to delete the multiple files in the same directory instead of using File Name Mas

  • Spotlight can't find file (even after re-indexing)

    I have a files right on my desktop that neither spotlight or finder can find in their search results. Don't know when this started happening, but very weird. I've re-indexed several different ways but still no luck. Anybody run into this?

  • Adobe PDF Creator (standard)

    hi, I have builed a MS Access 2003 database and would like to know if we buy Adobe PDF Creator (the standard version), will it be possible to make PDF document from severals computer wich is operate by co-workers.  In other words, do we have to by as

  • How to append data in column

    Hi , I have One Column Name in Emp table Now name is varchar2(100) Now i n name column only first name exists now I wants to append surname in column without using update statement as column consist of first name i wants to append surname so please d

  • Creating Slideshow

    I would like to place four small photos to loop without effects in a single location on our office webpage.  I thought there would be a simple way to do it in DW but I guess it is better to do it in Flash or a use third party plug-in.  I would like t