Partition of table reorganization

Hello

I have a pretty large table with the partition of the range. The person who ran a database before me, left huge amount of data in the default partition as existing partitioned filled and he did not create the new partition. Now, I'm putting together this table. The default partition has about 70 million lines. I want to know what will be the most effective way to carry out this exercise? the table has a primary key, foreign key, and also some other indexes on that.

In the test environment, I created new partitions. Data copied from the default partition in 6 temporary tables. Copy takes about 8 hours. Now, I'm debating if I should truncate data from default partition and move the lines of time tables created back into the new partitions by writing insert query? I know it's easier way out, but not the most effective way.

Another option I'm considering is, use datapump to export the data from the partition and then import, but I have not tried this? Can you show me or direct me to an example where the datapump is used to export and import a partition.

Oracle version: 11.2.0.3

Operating system: SUN Solaris 10

In the test environment, I created new partitions. Data copied from the default partition in 6 temporary tables. Copy takes about 8 hours. Now, I'm debating if I should truncate data from default partition and move the lines of time tables created back into the new partitions by writing insert query? I know it's easier way out, but not the most effective way.

We cannot help you if you SHOW us what you have done rather than simply say.

What is the table the original table DDL?

What is the DDL of the new test table?

What data is in each of 6 temporary tables?

If each of 6 temporary tables has data belonging to a single NEW partition then just use EXCHANGE PARTITION.

1. create 6 new partitions in the table

2 make a swap partition between each of the 6 new partitions and the corresponding temporary table is not partitioned.

Trade is expected to take less than a second because they are updates only data dictionary.

See my response and code example in this thread

https://community.Oracle.com/thread/3530260

Tags: Database

Similar Questions

  • Table partitioning on table MTL_SYSTEM_ITEMS_B?

    Hello

    We have an obligation to apply the partitioning on table MTL_SYSTEM_ITEMS_B. main reason is to improve the performance of queries.

    We planned to do with ORGANIZATION_ID column as the partition key.

    If anyone can share with your thoughts, what method of partition is good at this table to improve performance.

    Thank you

    Hello

    Please see these links/docs.

    Using partitioning of database with the E-Business Suite
    http://blogs.Oracle.com/stevenChan/2006/09/using_database_partitioning_wi.html

    Updated whitepaper: database, partitioning for E-Business Suite
    http://blogs.Oracle.com/stevenChan/2009/04/whitepaper_update_database_partitioning_for_ebusin.html

    Note: 554539.1 - database using partitioning with Oracle E-Business Suite

    Thank you
    Hussein

  • Partitioning of Tables/indexes

    Hello

    Oracle Version 10.2.0
    O/s Version: SUSE Linux

    Currently, all tables and indexes are stored in the ponit of NFS mounting. I would like to know if I can partition the tables/indexes on local storage temporarily.

    Thank you

    Hello
    Yes you can do it. But if you have a few scores on NAS and others on the local drive, then depending on the nature of the query/DML you will see some performance issues.

    MSK

  • Table reorganization

    I have a question on how to reorganize a table. I've also attached an example suggested by NEITHER, but it holds only for 4 ghosts. I am also attaching a simple example of a table to reorganize (testa.lmv)

    Summary:

    Several voltage-current spectra are stacked on each other in 2 columns (as in the example simple "testA.lmv", where 4 spectra with 11 points each are stacked one on the other).

    I need to turn this table in ' N (in the example N = 4) times 2 columns of the Np (in example 11) points of each.

    The number of Spectra and the number of points for each spectrum are known but vary from one experiment to another.

    In an experiment, the number of Np points by spectrum is identical for all ghosts stacked in 2 columns.

    For 4 spectra, it is easy to use tool "table under" and include 4 times the subarray tool to extract each spectrum.

    But because N is different for each experience, I'm not going to change every time the vi and so I tried to combine the tool "table under" a for (or in while loop) with N cycles, 1 for each spectrum.

    Unfortunately what it does not

    Anyone have an idea how to deal with such a combination of the subarray and loop For (or during)? or there is a better solution?

    Thank you

    Here is a code snippet that should help you!

    This should work for the data as your original data. However I could not test it because I miss a valid dataset.

    Tone

  • Dynamically partition a table based on different values of a specific column: possible?

    I'll start by explaining my problem, so that you can have a global vision of the problem and perhaps suggest another solution. Problem: I have 2 tables with millions of records. Records are added daily, and so each row in each table has a column of "insertion_date".

    C1 C2 ... C10 insertion_date (type date, ofc)
    

    lines are cleaned according to the insertion_date parameter. This can happen in two ways:

    1 - whenever an application error appears. In this case delete is based on a single day and would be like:

    delete from T1 where insertion_date=##;
    

    in other words remove us the lines added and then restart the program (business logic, can't change it)

    2. every two weeks the data associated with these two weeks are deleted because will be most used:

    delete from T1 where insertion_date between ## and ##; (a two weeks period here)   
    

    Delete is currently very slow: it takes abot 8 minutes just to remove approximately 5 M of records (with the same insertion_date), I can't even imagine the time required to delete records more.

    So, here's my idea!

    I would partition my DB according to the value of insertion_date.

    To remove case 1 I would simply delete the partion associated with this insertion date, to remove scores of cases 2 associates at that interval.

    For the needs of my application at most 15 were leaving are present each time (maybe 20 if I want to keep last at least 5 days of data), so the documented limit of 64000 partitions is not a problem.

    Real problem is that I do not know insertion_date values in advance, so my question: is it possible to automatically create a new partition every time presents itself a new value of insertion_date?

    And please correct me if I'm wrong, if I accomplish partitioning that I wouldn't need to edit above right queries? I know just the faster removal time am I correct?

    No - it isn't bog standard range partitioning partitioning interval

    But perhaps you're citing 9i documentation for a reason?

    It is a feature of 11g... then only about 10 years.

    create table t1
    (col1  date)
    partition by range (col1) interval (numtodsinterval(1,'DAY'))
    (partition po values less than (to_date('01-01-2015','DD-MM-YYYY')));
    
    table T1 created.
    
    select table_name, partition_name, high_value from user_tab_partitions where table_name = 'T1';
    
    TABLE_NAME                     PARTITION_NAME                 HIGH_VALUE
    ------------------------------ ------------------------------ --------------------------------------------------------------------------------
    T1                             PO                             TO_DATE(' 2015-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA...'
    
    insert into t1
    select trunc(sysdate,'MM')+rownum-1
    from   dual
    connect by  rownum <= 10;
    
    select table_name, partition_name, high_value from user_tab_partitions where table_name = 'T1';
    
    TABLE_NAME                     PARTITION_NAME                 HIGH_VALUE
    ------------------------------ ------------------------------ --------------------------------------------------------------------------------
    T1                             PO                             TO_DATE(' 2015-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA...'
    T1                             SYS_P450383                    TO_DATE(' 2015-07-02 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA...'
    T1                             SYS_P450384                    TO_DATE(' 2015-07-03 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA ...'
    T1                             SYS_P450385                    TO_DATE(' 2015-07-04 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA ...'
    T1                             SYS_P450386                    TO_DATE(' 2015-07-05 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA ...'
    T1                             SYS_P450387                    TO_DATE(' 2015-07-06 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA ...'
    T1                             SYS_P450388                    TO_DATE(' 2015-07-07 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA ...'
    T1                             SYS_P450389                    TO_DATE(' 2015-07-08 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA ...'
    T1                             SYS_P450390                    TO_DATE(' 2015-07-09 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA ...'
    T1                             SYS_P450391                    TO_DATE(' 2015-07-10 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA ...'
    T1                             SYS_P450392                    TO_DATE(' 2015-07-11 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA ...'
    
  • Unable to partition RTRIM table

    Hi Oracle professionals.

    recently, we changed the data type of CHAR in VARCHAR2 column and table is the partition table,

    After modification, we can not apply RTRIM for these tables. It gives an error message saying that it is impossible to change physical partitions.

    same problem with the tables with constraints

    Database is 11 GR 2

    Thanks in advance

    Concerning

    REDA

    If the update of the partition key is originally a movement of the different partition line then the table must be motion activated line.

    Find out what...

    SQL > create table temp
    () 2
    3 name varchar2 (100)
    4, varchar2 (1) sex
    5)
    6 partition by list (gender)
    () 7
    8 partition p_m values (').
    9 partition p_f values ("F"),
    10 partition p_o values ('o')
    (11);

    Table created.

    SQL > insert into temporary values ('kitsoukou',');

    1 line of creation.

    SQL > insert into values temporary ('anna', 'F');

    1 line of creation.

    SQL > insert into temporary values ('unknown', 'o');

    1 line of creation.

    SQL > commit;

    Validation complete.

    SQL > day sex set temp = am' where name = 'unknown ';
    update of sex set temp = am' where name = 'unknown '.
    *
    ERROR on line 1:
    ORA-14402: update of partition key column would cause a partition chang

    SQL > drop table temp;

    Deleted table.

    SQL > create table temp
    () 2
    3 name varchar2 (100)
    4, varchar2 (1) sex
    5)
    6 partition by list (gender)
    () 7
    8 partition p_m values (').
    9 partition p_f values ("F"),
    10 partition p_o values ('o')
    11)
    12 allow the movement of the line;

    Table created.

    SQL > insert into temporary values ('kitsoukou',');

    1 line of creation.

    SQL > insert into values temporary ('anna', 'F');

    1 line of creation.

    SQL > insert into temporary values ('unknown', 'o');

    1 line of creation.

    SQL > commit;

    Validation complete.

    SQL > day sex set temp = am' where name = 'unknown ';

    1 line update.

    If there is no such thing as the partition key...

    SQL > day sex set temp = 'X', where name = 'unknown ';
    update of sex set temp = 'X', where name = 'unknown '.
    *
    ERROR on line 1:
    ORA-14406: partition update key exceeds plu legal partition key

  • How to partition a table

    Hi all

    I use oracle 10g R2 64 bits on 64-bit windows server 2008.

    I am facing problem with a table, which seems to be supposed to be a table partitioned, because it expects the 80000 lines per year.

    This is the normal table for the table script

    create table Leave_Request (Leave_request_id number primary key,
                                              emp_id number references emp(emp_id) not null,
                                              leave_type_id number references leave_types(leave_type_id) not null,
                                              leave_apply_date date not null,
                                              leave_from_date date not null,
                                              leave_to_date date not null,
                                              remarks varchar2(3000));
    

    What is known, is that an index would be created to Leave_request_id automatically.

    now, my question is how to partition? How to create its index score?

    I read a few pages on the partitions and the notion of partitioning, but always confused with my situation.

    an example would be much appreciated.

    Thank you.

    First of all you must decide the column on which you want to partition in function. As you expect 80000 lines per year, you can partition it on the date column for example leave_apply_date with the partition of the RANGE.

    What is known, is that an index would be created to Leave_request_id automatically.

    No you need write explicitly create index statement to create indexes.

    now, my question is how to partition?

    Here is an example:

    CREATE TABLE sales_range

    (salesman_id NUMBER (5),)

    salesman_name VARCHAR2 (30),

    Sales_Amount NUMBER (10),

    Sales_Date DATE)

    PARTITION OF RANGE (sales_date)

    (

    PARTITION sales_jan2000 VALUES LESS THAN (TO_DATE('02/01/2000','MM/DD/YYYY')),

    PARTITION sales_feb2000 VALUES LESS THAN (TO_DATE('03/01/2000','MM/DD/YYYY')),

    PARTITION sales_mar2000 VALUES LESS THAN (TO_DATE('04/01/2000','MM/DD/YYYY')),

    PARTITION sales_apr2000 VALUES LESS THAN (TO_DATE('05/01/2000','MM/DD/YYYY'))

    );

    How to create its index score?

    Just add keyword LOCAL at the end of the create index example statement

    CREATE INDEX abc_ix_01 ON test (last_update_time) LOCAL app_index TABLESPACE;

    For more information, read Tables and partitioned indexes .

  • Partitioning the table - range on data type (21, 7) number and varchar2

    Hello

    Database version:

    DB: Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    Operating system: HP - UX nduhi18 B.11.31 U ia64 1022072414 unlimited-license user

    APP: SAP - ERP

    I have to the partition of the RANGE on UPDATED_ON or PROFILE is a table that has a structure below:

    Name Null?    Type

    -------------------- -------- --------------

    ------------------

    MANDT NOT NULL VARCHAR2 (9)

    MR_ID NOT NULL VARCHAR2 (60)

    PROFILE NON-NULL VARCHAR2 (54)

    NO_REGISTRE NOT NULL VARCHAR2 (30)

    INTERVAL_DATE NOT NULL VARCHAR2 (24)

    AGGR_CONSUMPTION NOT NULL NUMBER (21.6)

    MDM_VERS_NO NOT NULL VARCHAR2 (9)

    MDP_UPDATE_DATE NOT NULL VARCHAR2 (24)

    MDP_UPDATE_TIME NOT NULL VARCHAR2 (18)

    NMI_CONFIG NOT NULL VARCHAR2 (120)

    NMI_CONFIG_FLAG NOT NULL VARCHAR2 (3)

    MDM_DATA_STRM_ID NOT NULL VARCHAR2 (6)

    NSRD NOT NULL VARCHAR2 (24)

    REASON_CODE NOT NULL VARCHAR2 (9)

    QUALITY_FLAG NOT NULL VARCHAR2 (3)

    METHOD_FLAG NOT NULL VARCHAR2 (6)

    MSATS_UPDATE_DAT NOT NULL VARCHAR2 (24)

    MSATS_UPDATE_TIM NOT NULL VARCHAR2 (18)

    READ_STATUS NOT NULL VARCHAR2 (3)

    LEGACY_FLAG NOT NULL VARCHAR2 (3)

    CREATED_ON NOT NULL NUMBER (21.7)

    CREATED_BY NOT NULL VARCHAR2 (36)

    UPDATED_ON NOT NULL NUMBER (21.7)

    UPDATED_BY NOT NULL VARCHAR2 (36)

    CVERSNO NOT NULL VARCHAR2 (18)

    OLDER_MD_FLAG NOT NULL VARCHAR2 (3)

    TRANSACTION_ID NOT NULL VARCHAR2 (108)

    According to my knowledge, RANGE is better suited for the DATE or NUMBER. and partition INTERVAL is available on the DATE or number.

    PROFILE of column

    I havets is of type VARCHAR2. I know that again I can partition as Oracle convert internally to varchar2 in number when the data is inserted. But the INTERVAL is not possible.  However, so could you please suggest how RANGE partition on PROFILE?

    CREATED_ON column:

    It's the NUMBER with decimals. Could you guide me please?

    Please let me know if you need more information?

    See you soon

    Sameer

    I partitioned table as below:

    PARTITION BY RANGE

    (

    "CREATED_ON".

    )

    SUBPARTITION BY HASH

    (

    'PROFILE '.

    )

    SUBPARTITION TEMPLATE

    (

    TABLESPACE SUBPARTITION 'PROF_SUB01"'PSAPISU."

    TABLESPACE SUBPARTITION 'PROF_SUB02"'PSAPISU."

    TABLESPACE SUBPARTITION 'PROF_SUB03"'PSAPISU."

    TABLESPACE SUBPARTITION 'PROF_SUB04"'PSAPISU."

    TABLESPACE SUBPARTITION 'PROF_SUB05"'PSAPISU."

    TABLESPACE SUBPARTITION 'PROF_SUB06"'PSAPISU."

    TABLESPACE SUBPARTITION 'PROF_SUB07"'PSAPISU."

    TABLESPACE SUBPARTITION 'PROF_SUB08"'PSAPISU."

    TABLESPACE SUBPARTITION 'PROF_SUB09"'PSAPISU."

    TABLESPACE SUBPARTITION 'PROF_SUB10' 'PSAPISU '.

    )

    (

    "BEF12_CP00" VALUES LOWER PARTITION TO (20120101000000),

    "JAN12_CP01" VALUES LOWER PARTITION TO (20120201000000),

    "FEB12_CP02" VALUES LOWER PARTITION TO (20120301000000),

    "MAR12_CP03" VALUES LOWER PARTITION TO (20120401000000),

    "APR12_CP04" VALUES LOWER PARTITION TO (20120501000000),

    "MAY12_CP05" VALUES LOWER PARTITION TO (20120601000000),

    "JUN12_CP06" VALUES LOWER PARTITION TO (20120701000000),

    "JUL12_CP07" VALUES LOWER PARTITION TO (20120801000000),

    "AUG12_CP08" VALUES LOWER PARTITION TO (20120901000000),

    "SEP12_CP09" VALUES LOWER PARTITION TO (20121001000000),

    "OCT12_CP10" VALUES LOWER PARTITION TO (20121101000000),

    "NOV12_CP11" VALUES LOWER PARTITION TO (20121201000000),

    "DEC12_CP12" VALUES LOWER PARTITION TO (20130101000000),

    "JAN13_CP13" VALUES LOWER PARTITION TO (20130201000000),

    "FEB13_CP14" VALUES LOWER PARTITION TO (20130301000000),

    "MAR13_CP15" VALUES LOWER PARTITION TO (20130401000000),

    "APR13_CP16" VALUES LOWER PARTITION TO (20130501000000),

    "MAY13_CP17" VALUES LOWER PARTITION TO (20130601000000),

    "JUN13_CP18" VALUES LOWER PARTITION TO (20130701000000),

    "JUL13_CP19" VALUES LOWER PARTITION TO (20130801000000),

    "AUG13_CP20" VALUES LOWER PARTITION TO (20130901000000),

    "SEP13_CP21" VALUES LOWER PARTITION TO (20131001000000),

    "OCT13_CP22" VALUES LOWER PARTITION TO (20131101000000),

    "NOV13_CP23" VALUES LOWER PARTITION TO (20131201000000),

    PARTITION 'OTHER_CPMAX' VALUES LESS THAN (MAXVALUE)

    )

    works very well.

  • What happens to the existing after the partition of table index and created with local index

    Hi guys,.

    / / DESC part id name number, varchar2 (100), number of wage

    In an existing table PART I add 1 column DATASEQ MORE. I wonder the part of table based on dataseq.now, the table is created with this logic of partition

    create the part table partition (identification number, name varchar2 (100), number of salary, number DATASEQ) in list (dataseq) (values partition PART_INITIAL (1));

    Suggestionn necessary. given that the table is partitioned based on DATASEQ I wonder to add local indexes on dataseq. to dataseq, I have added a local index create index idx on share (dataseq) LOCAL; Now my question is, already, there are the existing index is the column ID and salary.

    (1) IDX for dataseq is created locally so that it will be partition on each partition on the main table. Please tell me what is happening to the index on the column ID and salary... it will create again in local?

    Please suggest

    S

    Hello

    first of all, in reality 'a partition table' means create a new table a migration of existing data it (although, theoretically, you can use dbms_redefinition to partition an existing table - however, it's just doing the same thing behind the scenes). This means that you also get to decide what to do with the index - index will be local, who will be global (you can also reassess some of existing indexes and decide that they are not really necessary).

    Second of all, the choice of the partitioning key seems weird. Partitioning is a data management technique more that anything else, in order to be eligible, you must find a good partitioning key. A column recently added, named "data_seq" is not a good candidate. Can you give us more details about this column and why it was chosen as a partitioning key?

    I suspect that the person who proposed this partitioning scheme made a huge mistake. A non-partitioned table is much better in all aspects (including the ease of management and performance) that divided one wrongly.

    Best regards

    Nikolai

  • partition in maintained growth index, partition of table didn't need to add space.

    Version Oracle 11 g 1 material, OS is aix.

    We have a 100 to dataware house, are partitioned with the index.

    Each table move data 6 months previously and even with the index. However our table tablespace has not seen more, but index tablespace kept more and more, I have to keep adding spaces.

    How to address this issue? where to find the problem is?

    Thanks in advance.

    >
    I joined dba_segments with dba_objects to get nom_segment, owner, created, bytes/1024/1024 as this tablespace.
    . . .
    EVENT_TYPE_HGRAM_DEV STATS INDEX SUBPARTITION 28-SEP-05 DECEMBER 10 05
    1
    >
    Does not the validation of the application and the columns you listed do not match the data that you have posted.

    EVENT_TYPE_HGRAM_DEV - the name says a statistical histogram on the EVENT_TYPE table in the DEV environment. This object name means something to you?

    Enter you two dates but only "created" as a column. And what is the '1' represent?

    You also do not show an OWNER but mention a column 'owner '.

    Which table is, or has been, this index belong to? The table still exists? Have you purged the recyclebins?

  • Prevent specific users to drop the partition of table

    Hello

    I'm having the following problem: on the CUSTOMERS table, I implemented a policy that prevents specific users to delete records that have REPORT_DATE (it is a DATE column) over 2 months. Works very well.
    These users are actually "login" I identify using sys_context ('USERENV', 'OS_USER').

    However... I realized that these users can fall any partition of this table (the table partitioned BY RANGE) so the policy that I have implemented is unnecessary.

    My question: is it possible to prevent specific users to delete a partition?
    All partitions in the CUSTOMERS table are associated with a REPORT_DATE unique that's why I want to prevent the destruction of the wall that has a REPORT_DATE related more than two months...


    Thank you
    MR. R.

    Hello

    Revoke the privilege of the Oracle user who is connected. (privileges are granted to the and helped by users Oracle, no internal users that you identify well as SYS_CONTEXT.)

    If it is the owner of the schema, and then create a different pattern of all the newspapers-ins, which has only the privileges that these users must have. Modify the application so that it uses this log-in Oracle and not the owner of the table schema.

  • Join wise Partition 3 tables is possible?

    Hello
    I have two tables. One is an array of key-value (EAV model).
    The key-value table has a partitioning of reference through the reference to the main table, which is partionned by the time.
    I want to choose to select all entries in the main table with two specific value in the table "key-value. Because each value is a line, I need to join (or do a subquery) table of the value of key as many times as I have values to search.
    In my case, the query is:
        SELECT p.pdu_id
        FROM  pdu p
        INNER JOIN field_value fv  ON (fv.pdu_id = p.pdu_id   AND fv.field_id = 4)
        INNER JOIN field_value fv2 ON (fv2.pdu_id = p.pdu_id  AND fv2.field_id= 3)
        WHERE
            P.TIME     > to_date('11/21/2006 00:00:00','MM/DD/YYYY HH24:MI:SS')
        AND P.TIME   < to_date('11/28/2006 00:00:00','MM/DD/YYYY HH24:MI:SS')
        AND fv.value = '0xFFFFFF'
        AND fv2.value = 'aircraft'
    This query can also be written like this:
    SELECT p.pdu_id
    FROM
      (
        SELECT p.pdu_id
        FROM pdu p
        INNER JOIN field_value fv ON (fv.pdu_id = p.pdu_id AND fv.field_id = 4)
        WHERE
            P.TIME     > to_date('11/21/2006 00:00:00','MM/DD/YYYY HH24:MI:SS')
        AND P.TIME   < to_date('11/28/2006 00:00:00','MM/DD/YYYY HH24:MI:SS')
        AND fv.value = '0xFFFFFF'
      )  p
    INNER JOIN field_value fv2 ON (fv2.pdu_id = p.pdu_id AND fv2.field_id = 3)
    WHERE fv2.value = 'aircraft'
    The two motions have comparable performance and explain the plan.
    This query takes time looooonnng... When I look at the plan to explain it and I can see that only a partition of Oracle 'p' access, only a score of "fv", but all the fv2 partition!

    An idea to make fv2 use only the right partition?

    Thanks in advance

    Published by: Thibault January 31, 2011 03:16

    Hello

    Try this and use an index on the column used for Assembly.

    SELECT / * + (p.pdu_id_idx) * / p.pdu_id of
    (select pdu_id from pdu, including TIME > to_date (November 21, 2006 00:00:00 "," MM/DD/YYYY HH24:MI:SS'))
    AND THE TIME< to_date('11/28/2006="" 00:00:00','mm/dd/yyyy="">
    (select pdu_id field_value where value = "0xFFFFFF" and field_id = 4) fv,.
    (select pdu_id field_value where value = "airplane" and field_id = 3) fv2
    where p.pdu_id = fv.pdu_id
    and p.pdu_id = fv2.pdu_id;

  • Is it possible to partition a table create a partition itself?

    Hello

    I've migrated a table in the partition table by years on the production system.
    But I thought, after the new year 2011 must I add new partition again for 2011?

    For example,.
    When a new record comes for 2011, and if there is no partition for 2011 the table must be to create the new partition for 2011 himself?

    Each year I'll add new partition myself? It is a tedious job.

    Yes. I know MAXVALUE, but I don't want to use it. I want to be done automatically.

    Kind regards

    Hello
    Change in your script like below.

    SQL> DECLARE
      2   str varchar2(200);
      3   dt varchar2(20) ;
      4   BEGIN
      5   dt := TO_CHAR(round(sysdate,'month'),'DD/MM/YYYY');
      6   str := 'alter table INVOICE_PART1 add partition INV'||TO_CHAR(TO_DATE(sysd
    ate,'DD/MM/RR'),'YYYY')||' VALUES LESS THAN (TO_DATE('''||dt||''',''DD/MM/YYYY''
    ))';
      7
      8   dbms_output.put_line(str);
      9   EXECUTE IMMEDIATE str;
     10  END;
     11  /
    alter table INVOICE_PART1 add partition INV2010 VALUES LESS THAN
    (TO_DATE('01/01/2011','DD/MM/YYYY'))
    
    PL/SQL procedure successfully completed.
    
    SQL>
    

    Kind regards
    Avinash

  • Can we import data from partition to a partition not table table?

    Hello

    I have partition table export dump.i want to import the table into the table to partition not... is it possible?



    Thank you
    Yusuf

    Yes. Just pre-create the table partitions WITHOUT in the system that you want to import. Then start the import operation with ignores = (ignore existing objects). To import the rows in the table, and since it is not defined with partitions there is no partitions.

  • need help to determine the type of partition for tables

    Hello

    I have a few tables that have millions of record. In some tables, we have data from previous years, that we do not now use. Can we create a partition of this type of tables table.

    On other tables, how to decide if you should use the range/list/hash partitioning on our tables.

    Do I need to recreate indexes for the tables after you create the partition tables.

    Please guide me.

    Best regards

    Partitioning of decisions are based on how you can access data.

    If you access date then partition by date.
    If you go through a list of values and then use the list.
    If you there is no model and you just need to break the data up into smaller compartments using hash.

    I don't see why, based on what you wrote, partitioning by date range would be not worthy of consideration.

Maybe you are looking for