Partitioning in table.

Hello,
In my company we have a ERP system. In which we have a Finance Module . One of the table in it keeps the record of the accounting year (ex- 08-09,09-10 or 10-11). Now my senior has given me a task to partition that table as per the accounting year. Should i use range partitioning ? give me some idea which will be the best thing to use here ....if you need anymore details , can ask me ....Thanks !!!
Oracle 10g R2
Windows server 2005

First question that you should ask is why you want to use partitioning ?
What are your goals ?
They can be (from http://download.oracle.com/docs/cd/E11882_01/server.112/e10713/schemaob.htm#CFAGCECI):
>
Increased availability
The unavailability of a partition does not entail the unavailability of the object. The query optimizer automatically removes unreferenced partitions from the query plan so queries are not affected when the partitions are unavailable.
Easier administration of schema objects
A partitioned object has pieces that can be managed either collectively or individually. DDL statements can manipulate partitions rather than entire tables or indexes. Thus, you can break up resource-intensive tasks such as rebuilding an index or table. For example, you can move one table partition at a time. If a problem occurs, then only the partition move must be redone, not the table move. Also, dropping a partition avoids executing numerous DELETE statements.
Reduced contention for shared resources in OLTP systems
In some OLTP systems, partitions can decrease contention for a shared resource. For example, DML is distributed over many segments rather than one segment.
Enhanced query performance in data warehouses
In a data warehouse, partitioning can speed processing of ad hoc queries. For example, a sales table containing a million rows can be partitioned by quarter.

Similar Messages

  • Problem while partitioning The Table

    create table Employee ( empno number(3), name varchar2(10), deptno number(4))
    partition by range(deptno)
    (partition p1 values less than(11),
    partition p2 values less than(21),
    partition p3 values less than(31));
    create table Employee (
    ERROR at line 1:
    ORA-00439: feature not enabled: Partitioning
    Please help me for solving this problem and send me the details I need to partition my table.
    Thanks in advance.
    w.regards
    R.Satish

    Looks like you don't have partition license or don't have a complete install of Oracle version 8.0.5. The best way to check is do a sqlplus user/passwd and look for a message that said "Production with the Partitioning and objects options" to appear before the SQL> prompt. Hope this helps....
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by rkumar:
    create table Employee ( empno number(3), name varchar2(10), deptno number(4))
    partition by range(deptno)
    (partition p1 values less than(11),
    partition p2 values less than(21),
    partition p3 values less than(31));
    create table Employee (
    ERROR at line 1:
    ORA-00439: feature not enabled: Partitioning
    Please help me for solving this problem and send me the details I need to partition my table.
    Thanks in advance.
    w.regards
    R.Satish <HR></BLOCKQUOTE>
    null

  • Limit on the number of partitions a table can have

    Hi,
    It's been quite some time I'm thinking of a simple and the best solution to a performance issue in my application. Benefiting out of partitioning the table seems a simplest approach; it involves very minimal changes to my application code and in addition, it keeps the overall application logic 100% intact. However, at times, the number of partitions required can grow to as large as 500 thousand. I know of another application implementing as many as 50 thousand partitions for one of its tables. I'm wondering if Oracle recommends or poses any limit to a number of partitions the table can have. How does that limit, if it exists, vary if each of my table partition holds only a small amount of data; say, not more than 2 thousand records each of 1 KB size. What are the important considerations that one needs to keep in mind while creating the huge number of partitions for a table?
    Any inputs on this would be a great help.
    Thanks,
    Aniruddh
    ps: Consider Oracle releases 10g onwards.
    Edited by: Aniruddh on Dec 30, 2009 9:46 AM
    Edited by: Aniruddh on Dec 30, 2009 9:50 AM

    Aniruddh,
    >
    What are the important considerations that one needs to keep in mind while creating the huge number of partitions for a table?
    >
    I doubt if you are using partitioning for the right causes. Please explain how is your data structured and why you need to create so many partitions..?
    when creating partition, you need to consider..
    a) why you need to partition?
    b) how is your data structured
    c) how your data is indexed.
    d) What kind of queries would you firing on this table to get the data. Will they use the partition key ?
    Thanks,
    Rajesh.
    Please mark this/any other answer as helpful or answered if it is so. If not, provide additional details/feedback.
    Always try to provide create table and insert statements to help the forum members help you better.

  • PL/SQL- Problem in creating a partitioned fact table using select as syntax

    Hi All,
    I am trying to create a clone(mdccma.fact_pax_bkng_t) of existing fact table (mdccma.fact_pax_bkng) using dynamic pl/sql. However, pl/sql anonymous block errors out with following error:
    SQL> Connected.
    SQL> SQL> DECLARE
    ERROR at line 1:
    ORA-00911: invalid character
    ORA-06512: at "SYS.DBMS_SYS_SQL", line 1608
    ORA-06512: at "SYS.DBMS_SQL", line 33
    ORA-06512: at line 50
    Here is pl/sql block:
    -- CREATING FPB_T
    DECLARE
    v_owner VARCHAR2(32) := 'MDCCMA';
    v_table_original VARCHAR2(32) := 'FACT_PAX_BKNG';
    v_table VARCHAR2(32) := 'FACT_PAX_BKNG_T';
    v_tblspc VARCHAR2(32) := v_owner||'_DATA';
    CURSOR c_parts IS SELECT TABLESPACE_NAME, PARTITION_NAME,HIGH_VALUE, ROW_NUMBER() OVER (ORDER BY PARTITION_NAME) AS ROWNUMBER
    FROM USER_TAB_PARTITIONS
    WHERE TABLE_NAME = v_table_original
    ORDER BY PARTITION_NAME;
    v_cmd CLOB := EMPTY_CLOB();
    v_cmd3 varchar2(300) := 'CREATE TABLE ' ||v_owner||'.'||v_table||' TABLESPACE '||v_tblspc
    ||' NOLOGGING PARTITION BY RANGE'||'(' ||'SNAPSHOT_DTM '||')' ||'(';
    v_part VARCHAR2(32);
    v_tblspc_name VARCHAR2(32);
    v_row number;
    v_value LONG;
    v_tmp varchar2(20000);
    v_cur INTEGER;
    v_ret NUMBER;
    v_sql DBMS_SQL.VARCHAR2S;
    v_upperbound NUMBER;
    BEGIN
    v_cmd := v_cmd3;
    OPEN c_parts;
    FETCH c_parts INTO v_tblspc_name, v_part,v_value, v_row;
    WHILE c_parts%FOUND
    LOOP
    IF (v_row = 1) THEN
    v_tmp := ' PARTITION '||v_part||' VALUES LESS THAN ' ||'('|| v_value||')'||' NOLOGGING TABLESPACE '||v_tblspc_name;
    ELSE
    v_tmp := ', PARTITION '||v_part||' VALUES LESS THAN ' ||'('|| v_value||')'||' NOLOGGING TABLESPACE '||v_tblspc_name;
    END IF;
    v_cmd := v_cmd || v_tmp;
    -- DBMS_OUTPUT.PUT_LINE(v_cmd);
    FETCH c_parts INTO v_tblspc_name, v_part,v_value, v_row;
    END LOOP;
    -- DBMS_OUTPUT.PUT_LINE('Length:'||DBMS_LOB.GETLENGTH(v_cmd));
    v_cmd := v_cmd||')'||' AS SELECT ' || '*'||' FROM ' || v_owner||'.'|| v_table_original ||' WHERE '||'1'||'='||'2'||';';
    v_upperbound := CEIL(DBMS_LOB.GETLENGTH(v_cmd)/256);
    FOR i IN 1..v_upperbound
    LOOP
    v_sql(i) := DBMS_LOB.SUBSTR(v_cmd
    ,256 -- amount
    ,((i-1)*256)+1 -- offset
    END LOOP;
    v_cur := DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE(v_cur, v_sql, 1, v_upperbound, FALSE, DBMS_SQL.NATIVE);
    v_ret := DBMS_SQL.EXECUTE(v_cur);
    CLOSE c_parts;
    DBMS_OUTPUT.PUT_LINE(v_cmd);
    -- EXECUTE IMMEDIATE v_cmd ;
    END;
    The above pl/sql creates a DDL for partitioned fact table(new) based on an existing fact table and get executes through CLOB.
    Please look into the issue and let me know any changes or modifications/suggestions that are required to fix the issue. Any help is appreciated.
    Thank You,
    Sudheer

    Think this is your problem:
    v_cmd := v_cmd||')'||' AS SELECT ' || '*'||' FROM ' || v_owner||'.'|| v_table_original ||' WHERE '||'1'||'='||'2'||';';Remove the SQL terminator ';' ... dynamic SQL doesn't require it, try this instead:
    v_cmd := v_cmd||')'||' AS SELECT ' || '*'||' FROM ' || v_owner||'.'|| v_table_original ||' WHERE '||'1'||'='||'2';Thanks
    Paul

  • Partitioning of table in oracle 10g - How to Add

    Hello Friends ,
    Hope you are all fine and doing great.
    By the way - I have a quick question on oracle 10g Partitioning of tables...
    I have a table with partition as stated below ..
    CREATE TABLE X_ACC_ASSETS_GPC_AGG
    X_ACC_ASSETS_GPC_AGG_RK NUMBER(10) NOT NULL,
    X_AS_OF_DT DATE NOT NULL,
    ACCOUNT_RK NUMBER(10) NOT NULL,
    X_UNIV_ACCOUNT_ID NUMBER(10),
    ACCOUNT_ID VARCHAR2(10 BYTE),
    X_ASSET_TYPE_CD VARCHAR2(6 BYTE),
    X_AUC_AMT NUMBER(18,5),
    X_FIRM_AMT NUMBER(18,5),
    X_ADJ_SRCE_AMT NUMBER(18,5),
    PROCESSED_DTTM DATE
    )PARTITION BY RANGE (X_AS_OF_DT)
    PARTITION P200712 VALUES LESS THAN (TO_DATE(' 2008-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P201112
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION PMAX
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    )NOPARALLEL;
    My question is :
    1) How to add a partition say P201201 ..
    Since I have already stated PARTITION PMAX can I still add partition?
    2) Can I add partition even though the table has data ?
    ==========================
    I tried to add partition ..say
    ALTER TABLE X_ACC ADD PARTITION P201201 VALUES LESS THAN
    (TO_DATE(' 2012-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    but getting the error ..
    "partition bound must collate higher than that of the last partition"
    Thanks/kumar

    You have partitions
    200712
    200812
    200912
    201012
    201112
    PMAX.
    so your condition for partition p201112 is '201012-01-01' to '201112-01-01' i.e the values between these two dates will be in partition p201112. and then everything else will be in PMAX. So now you are splitting your pmax.
    alter table X_acc split partition pmax at ( to_date('2012-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') )
    into (partition p201201, partition pmax); The condition you have to change. I just showed as an example. It could be the date range between two dates or it could be greater than a date value. It is upto how you want this new partition.
    how to add partition between two partition
    Edited by: pransuj on Mar 25, 2011 11:13 AM
    Edited by: pransuj on Mar 25, 2011 11:14 AM

  • Sql server partition parent table and reference not partition child table

     
    Hi,
    I have two tables in SQL Server 2008 R2, Parent and Child Table.  
    Parent has date time, and it is partitioned monthly,  there is a Child table which just refer the Parent table using Foreign key relation.   
    is there any problem the non-partitioned child table referring to a partitioned parent table?
    Thanks,
    Areef

    The tables will need to be offline for the operation. "Offline" here, means that you wrap the entire operation in a transaction. Ideally, this transaction would:
    1) Drop the foreign key.
    2) Use ALTER TABLE SWITCH to drop the old data.
    3) Use ALTER PARTITION FUNCTION to drop the old empty partition.
    4) Use ALTER PARTITION FUNCTION to add a new empty partition.
    5) Reapply the foreign keys WITH CHECK.
    All but the last operation are metadata-only operation (provided that you do them right). To perform the last operation, SQL Server must scan the child tbale and verify that all keys are present in the parent table. This can take some time for larger tables.
    During the transaction, SQL Server holds Sch-M locks on the table, which means that are entirely inaccessible, even for queries running with NOLOCK.
    You avoid this the scan by applying the fkey constraint WITH NOCHECK, but this can have impact on query plans, as SQL Server will not consider the constraint as trusted.
    An alternative which should not be entirely dismissed is to use partitioned
    views instead. With partitioned views, the foreign keys are not an issue, because each partition is a pair of tables, with its own local fkey.
    As for the second question: it appears to be completely pointless to partition the parent, but not the child table. Or does the child table only have rows for a smaller set of the rows in the parent?
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Partitioning of tables  in oracle 1og

    I want to do the partitioning of tables due to increasing their size.Can anyone guide me cn I do it? Is it possible to do it?If possible then how can i do it.plz guide mme with al qeuries.
    thanks.

    While it is certainly possible to partition tables (assuming you have the enterprise edition and the partitioning option), that is not something that you would generally want to take a cookbook approach to. Partitioning tables incorrectly is a great way to slow down the system and make it oodles more difficult to support. Partitioning requires a fair amount of architecture and design to get right, and that, in turn, requires that you understand how partitioning works, how your application works, and what you want partitioning to do to change the way your application works.
    Justin

  • Partitioning A table on a data column

    Hi,
    My requirement is to partition a table using a column with DATE datatype.
    Example:
    CREATE TABLE parttab
    STATUS CHAR(1) DEFAULT 'a' NOT NULL,
    UPDATER VARCHAR2(55) NOT NULL,
    UPDTIME DATE DEFAULT SYSDATE NOT NULL
    TABLESPACE part_tbs
    Now i want to RANGE partition the above table on the "UPDTIME" column, so that it will look like:
    Partition Value from Value till
    P1 01-Jan 31-Mar
    P2 01-Apr 30-Jun
    P3 01-Jul 30-Sep
    P4 MAXVALUE
    I tried using the below syntax, but failed with error.
    CREATE TABLE parttab
    STATUS CHAR(1) DEFAULT 'a' NOT NULL,
    UPDATER VARCHAR2(55) NOT NULL,
    UPDTIME DATE DEFAULT SYSDATE NOT NULL
    TABLESPACE part_tbs
    LOGGING
    PARTITION BY RANGE (UPDTIME)
    PARTITION P1 VALUES LESS THAN (to_date('04','MM')) LOGGING COMPRESS TABLESPACE part_tbs_P1,
    PARTITION P2 VALUES LESS THAN (to_date('07','DD-MM')) LOGGING COMPRESS TABLESPACE part_tbs_P2,
    PARTITION P3 VALUES LESS THAN (to_date('10','DD-MM')) LOGGING COMPRESS TABLESPACE part_tbs_P3,
    PARTITION P4 VALUES LESS THAN (MAXVALUE) LOGGING COMPRESS TABLESPACE part_tbs_P4
    COMPRESS
    NOCACHE
    PARALLEL ( DEGREE 2 INSTANCES Default )
    ROWDEPENDENCIES
    NOMONITORING
    ENABLE ROW MOVEMENT;
    Please suggest.
    Thanks in advance for the suggestions.

    what is the error message and your Oracle version? this sample may assist I guess -
    CREATE TABLE range_part (
    prof_history_id NUMBER(10),
    person_id       NUMBER(10) NOT NULL,
    organization_id NUMBER(10) NOT NULL,
    record_date     DATE NOT NULL,
    ph_comments     VARCHAR2(200))
    PARTITION BY RANGE (record_date) (
    PARTITION yr0 VALUES LESS THAN (TO_DATE('01-JAN-2000','DD-MON-YYYY'))
    TABLESPACE part1,
    PARTITION yr1 VALUES LESS THAN (TO_DATE('01-JAN-2001','DD-MON-YYYY'))
    TABLESPACE part2,
    PARTITION yr2 VALUES LESS THAN (TO_DATE('01-JAN-2002','DD-MON-YYYY'))
    TABLESPACE part3,
    PARTITION yr9 VALUES LESS THAN (MAXVALUE) TABLESPACE part4);for more examples you may visit - http://psoug.org/reference/partitions.html

  • I have partitioned my tables, do I need to rebuild the indexes of the table

    Hello,
    I have partition very huge tables, by using rage partition method. After that few queries taking more time than before. Does the old indexes needs to rebuild?
    Thanks

    929941 wrote:
    Hello,
    I have partition very huge tables, by using rage partition method. After that few queries taking more time than before. Does the old indexes needs to rebuild?
    ThanksWhat do you think?
    By the way, how did you partition existing tables? Did you use dbms_redefinition, or did you use CTAS, or some other method?
    I love RAGE partitions. You should always always partition your rage.

  • Partitioning Fact Table

    Hi
    In our data warehouse we have a Fact table which has grown quite a large in size around 17 million records. We have been pondering on the options to partition this table.
    Unfortunately this fact table does not have any date columns , all columns are surrogate keys of dimensions, even for time dimensions. My idea is to partition by range by manually specifying the surrogate key ranges of time dimension. Is that the way one proced with?
    Other option is to, add a new column to the Fact Table and populate with the corresponding "ddmmyyyy" in number format and use that one to partition the table. If I go with this approach, if in my reports / queries if I use the dimension key to join between the Fact and Dimension, will oracle still identify which partition to look for? Or do I MUST use the partitioned column in the queries for partition pruning to be effective.
    Any thoughts would be useful.
    Regards
    Mahesh

    if in my reports / queries if I use the dimension key to join between the Fact and Dimension, will oracle still identify which partition to look for? No the oracle will not use the Partition Prunning in this case.
    Or do I MUST use the partitioned column in the queries for partition pruning to be effective.yes , you need to use the partitioned column for partition pruning to be effective.
    Cheers
    Nawneet

  • Partition of table in real life

    Hi all
    i have read about partition of table.
    but i have lot of question in this topic.
    1.which one is better
    range partiting
    hash "
    list "
    composite "
    2.how we can use partition in select statment
    when we don't know about the partition values.
    suppose partition acc to month in table
    and user enter his rollno to see its details then
    how we can give details to user acc to his rollno
    plz give e.g in which partiting is use
    3.partition is userful in oltp system or both (oltp+dss)
    4.partition gives benefit for report creation or not.
    thanks all
    kuljeet pal singh

    1) If one partitioning method were better, Oracle wouldn't have all three options. Each type of partitioning is appropriate in some instances and inappropriate in others.
    2) I'm really not sure what you're asking here. Can you rephrase the question? Also, can you explain the abbreviations "acc" and "rollno"?
    3) Partitioning can be useful in all types of systems. Different types of systems, though, tend to be interested in different partitioning benefits. Data warehouses tend to look at partitioning as much for the managability benefits (decreasing backup times, simplifying maintenance tasks, etc) as for the performance benefits. OLTP systems are less interested in the managability benefits.
    4) Partitioning may or may not speed up report creation. It depends upon the partitioning method, the data distribution, the access patterns of the report, and a number of other variables.
    Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com/askDDBC

  • Partition of table in ODI

    Hi..friends.
    can we use partition of table in ODI 11g?
    please give an example with video or picture representation.
    Regards
    Soumya.

    Its still not clear if we can load data in parallel in different partition if yes then how. Do we need to create seperate interface to load data in each partition?
    Thanks
    Kashi

  • Should I partition a table or not???

    I have a table with well over 8 million records and growing around 15,000 records daily. It is queried through a form (forms6i), no updates are done on the form just "select". The indexes are set up for the 2 types of querries mostly performed- by a date criteria and an id criteria. Is indexing good enough? I notice that it is getting harder to get results from date specific querries. What is the best approaches to ensure the table is optimized for querries? I am not used to working with such a large table size. Does partitioning help indexes work more efficient? Should I run statistics on the whole table?? I am not comfortable running statistics on the table when I am not around to monitor the performance on the server. The database runs 24 hours, 7 days a week- there is no real "downtime" to run stats.
    Please advise, I would like to find a best practice approach.

    Re: Should I partition a table or not???
    Posted: Jun 19, 2007 11:59 AM in response to: user542952 Reply
    (small correction in my earlier posting)
    mostly performed- by a date criteria and an id criteriaPartitioning NOT always imporves performance. It can degrade performance if you had NOT partitoned based on queries those hit.
    Beaware of local indexes. You might degrade performance because you may need to proble mulitple index partitions.
    Do you query date and Ids by range search or exact search ?.
    How much data (roughly 10% ,20% , 1% etc..) you fetch through the query

  • Two billion record limit for non-partitioned HANA tables?

    Is there a two billion record limit for non-partitioned HANA tables? I've seen discussion on SCN, but can't find any official SAP documentation.

    Hi John,
    Yes there is a limit for non-partitioned tables in HANA. In the first page of this document says: SAP HANA Database – Partitioning and Distribution of Large Tables
    A non - partitioned table cannot store more than 2 billion rows. By using partitioning, this
    limit may overcome by distributing the rows to several partitions. Please note, each partition must not contain more than 2 billion rows.
    Cheers,
    Sarhan.

  • Partitioning the tables

    i have a table that logs an actigtivity
    it has activity date time
    its a very large table...which i havnt partitioned.
    because i havnt got the archiving requirements.
    my questions is .. should i blindly create a monthly partition based on date key or should i wait for the archiving requirements?
    what is the criteria to partition the table?
    is it the amount of data ... or the archiving strategy. which one of these two should i take as the deciding factor to create partitions
    regards
    raj

    my problem is that
    i have two tables A and B
    A has a column called activity date time and B is the child table for A.
    i did not create partitions on both the tables because... i did not know the online data requirement.
    now for a code move people are complaining that i did not create monthly partitions before...
    my quesitioon is that...
    shouldnt we wait for the online data requirement to come then think of partitioning the table?
    or rather than waiting
    should we blindly create the monthly partitions on activity date time?
    regards
    raj

  • Partition a table

    Hi,
    i should want to know what are the benefit to partition a table, because I follow the step on:
    http://docs.oracle.com/cd/B19306_01/server.102/b14231/tables.htm#i1006754
    the example 1.
    but i cannot demostrate some really benefit.
    For example:
    I have a table AVAN with some index, after that i made AVAN partitioned with the same index, How i can demostrate that after partioned the query executed on partioned table is better?
    If there is a solution of course.
    thanks
    Francesco

    Hi, I've runned the explain plan on a partitioned table and on a non-partitioned table (both table contain the same data).
    The table partioned has only an LOCAL index more, than do not have a partitioned table:
    For the table partioned:
    SQL> EXPLAIN PLAN SET STATEMENT_ID='PART'
      2  FOR
      3  select * from EVENTI_PM e where e.key_id_evento='50000034' and dt_inserimento = (select min(dt_inserimento) from eventi_pm e2
    where e.key_id_evento=e2.key_id_evento);
    Spiegato.See the plan:
    SQL> SELECT
      2  CARDINALITY,
      3  BYTES,
      4  COST,
      5  POSITION,
      6  PARTITION_START,
      7  PARTITION_STOP,
      8  PARTITION_ID,
      9  lpad(' ',level-1)||OPERATION||' '||OPTIONS||' '||object_name as Plan
    10    FROM PLAN_TABLE a
    11  CONNECT BY prior id = parent_id
    12          AND prior statement_id = statement_id
    13    START WITH id = 0
    14          AND statement_id = 'PART'
    15    ORDER BY id;
    CARDINALITY BYTES COST POSITION PARTITION_START PARTITION_STOP  PARTITION_ID PLAN
              1   144    5        5                                              SELECT STATEMENT
              1   144    5        1                                               NESTED LOOPS
              1    26    3        1                                                VIEW  VW_SQ_1
              1    17    3        1                                                 HASH GROUP BY
              2    34    3        1                                                  FIRST ROW
              2    34    3        1                                                   INDEX RANGE SCAN (MIN/MAX) EVENTO_PK
              1   118    2        2 KEY             KEY                        6   PARTITION HASH ITERATOR
              1   118    2        1 KEY             KEY                        6    TABLE ACCESS BY LOCAL INDEX ROWID EVENTI_P
                                                                                 M
              1          1        1 KEY             KEY                        6     INDEX UNIQUE SCAN INDICE_LOC
    Selezionate 9 righe.in which the cost is 5.
    the same thing for a non-partioned table:
    SQL> EXPLAIN PLAN SET STATEMENT_ID='NON_PART'
      2  FOR
      3  select * from EVENTI_PM2 e where e.key_id_evento='50000034' and dt_inserimento = (select min(dt_inserimento) from eventi_pm e
    2 where e.key_id_evento=e2.key_id_evento);
    Spiegato.see the plan
    SQL> SELECT
      2  CARDINALITY,
      3  BYTES,
      4  COST,
      5  POSITION,
      6  PARTITION_START,
      7  PARTITION_STOP,
      8  PARTITION_ID,
      9  lpad(' ',level-1)||OPERATION||' '||OPTIONS||' '||object_name as Plan
    10    FROM PLAN_TABLE a
    11  CONNECT BY prior id = parent_id
    12          AND prior statement_id = statement_id
    13    START WITH id = 0
    14          AND statement_id = 'NON_PART'
    15    ORDER BY id;
    CARDINALITY BYTES COST POSITION PARTITION_START PARTITION_STOP  PARTITION_ID PLAN
              1   144    5        5                                              SELECT STATEMENT
              1   144    5        1                                               NESTED LOOPS
              1    26    3        1                                                VIEW  VW_SQ_1
              1    17    3        1                                                 HASH GROUP BY
              2    34    3        1                                                  FIRST ROW
              2    34    3        1                                                   INDEX RANGE SCAN (MIN/MAX) EVENTO_PK
              1   118    2        2                                                TABLE ACCESS BY INDEX ROWID EVENTI_PM2
              1          1        1                                                 INDEX RANGE SCAN EVENTO_PK2
    Selezionate 8 righe.but the cost is the same, why?Even if only one partition was used. How i can demostrate to my self that the query in the partitioned table is better?
    I'm going to get crazy, partioned a table is not useful at all.Please help me!!!!!!!!!!!!!!!!!!!

Maybe you are looking for

  • Chram 4 system Landscape

    Dear Friends, One of our syetem has 4 system landscape and we have activated the same for chram process Dev -> QA -> Pre-PRD -> PRD Dev has the system Role as Source system QA and Pre-PRD has the system role Target system PRD has the system rolePRodu

  • How to add LLRP provider for BizTalk RFID Mobile on Motorola MC9090

    I simply need to add LLRP provider on to Motorola MC9090 where BizTalk 2010 RFID Mobile is installed.  I have read other threads regarding to the similar topics, but they all imply that LLRP provider automatically comes with installation of BizTalk M

  • Problems Installing creative suite 4 web premium

    Hi, I have windows XP service pack 3. 2.2ghz processor (64) 2gig ram 6600gt grafix card Problem is: Put disc in drive, click on install, starts initializing & stops on 90%! Left it running while i went out for approx 2hrs & still no progress. Just st

  • "Error getting license. License server communication problem: E_LIC_ALREADY_FULFILLED_BY_ANOTHER_USE

    I've also had problems with this.  I was on the chat line about 5 different times trying to figure it out, but Adobe chat is worthless. If they can't fix it my using their script notes, they refer you right back to the begining.  Ater trying several

  • Acrobat Plugin Unloading

    When closing Adobe Acrobat after using my plugin it throws an error. I release all my objects ( I Think ) when the following method is called ACCB1 ASBool ACCB2 PluginUnload () But still get the error. The part which seems to be the problem is the fo