LEAD with Partition

Hi,
I am stuck on a problem to implement LEAD/LAG with partition.
Below is the example and expected Result
create table trd(
     key number,
     book number,
     prd_key number,
     direction varchar2(2),
     trdtime date,
     price number)
insert into trd values(1234,115,133864,'B','17-07-2013 18:18:00',108.859375);
insert into trd values(1235,115,133864,'S','17-07-2013 18:18:00',108.859375);
insert into trd values(1245,115,133864,'S','17-07-2013 18:18:00',108.859375);
insert into trd values(1236,115,133864,'B','15-07-2013 18:18:00',108.872261598);
insert into trd values(1237,115,133864,'S','15-07-2013 18:18:00',108.866752398);
insert into trd values(1247,115,133864,'S','15-07-2013 18:18:00',108.866752398);
insert into trd values(1238,115,133864,'S','14-07-2013 18:18:00',107.86);
insert into trd values(1239,115,133864,'S','14-07-2013 18:17:00',108.86);
insert into trd values(1240,115,133864,'B','14-07-2013 18:12:00',109.86);
insert into trd values(1241,115,133864,'B','14-07-2013 18:17:00',110.86);
I need to return the value something like this:
Key
Book
Prd_Key
Direction
TrdTime
Price
NextPrice
1234
115
133864
B
7/17/2013 6:18:00 PM
108.859375
108.866752398
1235
115
133864
S
7/17/2013 6:18:00 PM
108.859375
108.872261598
1245
115
133864
S
7/17/2013 6:18:00 PM
108.859375
108.872261598
1236
115
133864
B
7/15/2013 6:18:00 PM
108.872261598
108.86
1237
115
133864
S
7/15/2013 6:18:00 PM
108.866752398
110.86
1247
115
133864
S
7/15/2013 6:18:00 PM
108.866752398
110.86
1238
115
133864
S
7/14/2013 6:18:00 PM
107.86
110.86
1239
115
133864
S
7/14/2013 6:17:00 PM
108.86
109.86
1240
115
133864
B
7/14/2013 6:12:00 PM
109.86
NULL
1241
115
133864
B
7/14/2013 6:17:00 PM
110.86
NULL
The logic to embed is :
For each record, Need to get the OPPOSITE direction's and Existing TrdTime > Other records TrdTime.
For example: for key 1237, the Direction is S and TrdTime is 7/15/2013 6:18:00 PM.
There are following records returned for this record:
1240 and 1241 both having opposite side ; 'B' and existing record TrdTime > these two records.
But the TrdTime of 1241 is selected since it is ordered by nearest and highest TrdTime.
How Can I implement this functionality.
I was thinking of doing it using LEAD function and partition.
I cannot use Cursors since tables are not indexed and there are over 5 mil records.
Any suggestions please.

Hi,
Here's a way to do it using the analytic LAST_VALUE function.
Let me know how this compares to the previous solution on your real data.
SELECT    t.*
,         CASE
              WHEN  direction = 'B'
              THEN  LAST_VALUE ( CASE
                                     WHEN  direction = 'S'
                                     THEN  price
                                END
                                IGNORE NULLS
                               ) OVER ( PARTITION BY  book
                                        ,             prd_key
                                        ORDER BY      trdtime
                                        RANGE BETWEEN UNBOUNDED PRECEDING
                                              AND      1E-6 PRECEDING
              WHEN  direction = 'S'
              THEN  LAST_VALUE ( CASE
                                     WHEN  direction = 'B'
                                     THEN  price
                                 END
                                 IGNORE NULLS
                               ) OVER ( PARTITION BY  book
                                        ,             prd_key
                                        ORDER BY      trdtime
                                        RANGE BETWEEN UNBOUNDED PRECEDING
                                              AND      1E-6 PRECEDING
          END AS nextprice
FROM      trd  t
--WHERE   ... -- If you want any filtering, put it here
ORDER BY  trdtime  DESC
,        direction
,        key
The magic number 1E-6 is an arbitrary number, less than the granularity of trdtime.  That is, we want to look at trdtimes up to and including 1 second (roughly .000012 days) in the past.  1E-6 is clearly less than that.

Similar Messages

  • I have one of the old macbooks and wish to hook it up to my tv. do i need a mini dvi to hdmi adapter plus a 3 rca phono lead with a jack for the sound. please help as im useless at this stuff. cheers

    i have one of the old macbooks and wish to hook it up to my tv. do i need a mini dvi to hdmi adapter plus a 3 rca phono lead with a jack for the sound. please help as im useless at this stuff. cheers

    First we need to know which one of the 9 different models of MacBook you have. To see which model you have go to the Apple in the upper left corner and select About This Mac, then click on More Info (and then System Report if you’re running 10.7 Lion). When System Profiler comes up check the Model Identifier and post it back here.
    The Late 2008 model 5,1 Aluminum Unibody and the Late 2009 model 6,1 and Mid 2010 model 7,1 White Unibody have a Mini DisplayPort. The Early 2006 model 1,1 through Early 2008 model 4,1s plus the Early and Mid 2009 model 5,2s have Mini-DVI ports. Each would take a different adapter to connect with the TV.

  • Table creation with partition

    following is the table creation script with partition
    CREATE TABLE customer_entity_temp (
    BRANCH_ID NUMBER (4),
    ACTIVE_FROM_YEAR VARCHAR2 (4),
    ACTIVE_FROM_MONTH VARCHAR2 (3),
    partition by range (ACTIVE_FROM_YEAR,ACTIVE_FROM_MONTH)
    (partition yr7_1999 values less than ('1999',TO_DATE('Jul','Mon')),
    partition yr12_1999 values less than ('1999',TO_DATE('Dec','Mon')),
    it gives an error
    ORA-14036: partition bound value too large for column
    but if I increase the size of the ACTIVE_FROM_MONTH column to 9 , the script works and creates the table. Why is it so ?
    Also, by creating a table in this way and populating the table data in their respective partitions, all rows with month less than "JULY" will go in yr7_1999 partition and all rows with month value between "JUL" and "DEC" will go in the second partition yr12_1999 , where will the data with month value equal to "DEC" go?
    Plz help me in solving this problem
    thanks n regards
    Moloy

    Hi,
    You declared ACTIVE_FROM_MONTH VARCHAR2 (3) and you try to check it against a date in your partitionning clause:TO_DATE('Jul','Mon')so you should first check your data model and what you are trying to achieve exactly.
    With such a partition decl, you will not be able to insert dates from december 1998 included and onward. The values are stricly less than (<) not less or equal(<=) hence such lines can't be inserted. I'd advise you to check the MAXVALUE value jocker and the ENABLE ROW MOVEMENT partitionning clause.
    Regards,
    Yoann.

  • ORA-00604 ORA-00904 When query partitioned table with partitioned indexes

    Got ORA-00604 ORA-00904 When query partitioned table with partitioned indexes in the data warehouse environment.
    Query runs fine when query the partitioned table without partitioned indexes.
    Here is the query.
    SELECT al2.vdc_name, al7.model_series_name, COUNT (DISTINCT (al1.vin)),
    al27.accessory_code
    FROM vlc.veh_vdc_accessorization_fact al1,
    vlc.vdc_dim al2,
    vlc.model_attribute_dim al7,
    vlc.ppo_list_dim al18,
    vlc.ppo_list_indiv_type_dim al23,
    vlc.accy_type_dim al27
    WHERE ( al2.vdc_id = al1.vdc_location_id
    AND al7.model_attribute_id = al1.model_attribute_id
    AND al18.mydppolist_id = al1.ppo_list_id
    AND al23.mydppolist_id = al18.mydppolist_id
    AND al23.mydaccytyp_id = al27.mydaccytyp_id
    AND ( al7.model_series_name IN ('SCION TC', 'SCION XA', 'SCION XB')
    AND al2.vdc_name IN
    ('PORT OF BALTIMORE',
    'PORT OF JACKSONVILLE - LEXUS',
    'PORT OF LONG BEACH',
    'PORT OF NEWARK',
    'PORT OF PORTLAND'
    AND al27.accessory_code IN ('42', '43', '44', '45')
    GROUP BY al2.vdc_name, al7.model_series_name, al27.accessory_code

    I would recommend that you post this at the following OTN forum:
    Database - General
    General Database Discussions
    and perhaps at:
    Oracle Warehouse Builder
    Warehouse Builder
    The Oracle OLAP forum typically does not cover general data warehousing topics.

  • Using AGO function with partitions

    I have a situation where we have logical sources with the same repository folder that are partitioned. We would like to use the AGO function but are getting the following error:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 22042] AGO function may not be used on '# Applied Invoices' because its source is horizontally partitioned. (HY000)
    Has anyone had success using the AGO function with partitions? If not, do you have an alternate solution to the problem?

    AGO doesn't work with partitions - it's documented on metalink....there's an enhancement request , but that's it - no work-around provided....I'd suggest creating a common view for that particular report

  • DATACOPY with partitioned data source

    Hello,
    I am actually working on the Hyperion Essbase EPM 11.1.2
    I am trying to perform a Datacopy command in a HBR.
    Data source are partitioned with a transparent partition.
    This datacopy do not work. The HBR is really fast but when I retrieve data no data are copied.
    I am wondering if this is possible to perform a datacopy command, in a HBR with partitioned data source.
    I have managed to perform this datacopy throw a HBR using the command:
    SET CREATEBLOCKONEQ
    Target = Source;
    But this method is really long.
    Thanks for your answer,
    Arthur.

    Hi
    Make sure that you have relevant Role & Authorization at Quality/PRS.
    You have to Transport the Source Cube first and then Create a Generate Export Data Source in QAS. Then, replicate data sources for BW QAS Soruce System. Make sure this replicated Data Source in QAS. Only then can transport new update rules for second cube.
    Hope it helps and clear

  • Troubles editing tables with partitions

    I'm running SQL Developer 1.5.3 against Oracle 10/11 databases and SQL Developer has trouble with my partitioned tables. Both the schema owner and sys users experience the same problems.
    The first time I try to edit a table, I get an "Error Loading Objects" dialog with a NullPointException message. If I immediately turn around and try to edit the table again, I get the Edit Table dialog. That's annoying but there's at least a work-around.
    Next, if I select the Indexes pane, I can view the first index but selecting another one results in an "Index Error on <table>" error dialog. The message is "There are no table partitions on which to define local index partitions". At this point, selecting any of the other panes (Columns, Primary Key, etc.) results in the same dialog. While the main Partitions tab shows my partitions, I cannot see them in the Edit Table dialog. In fact, the Partition Definitions and Subpartition Templates panes are blank.
    Does anyone else see this behavior? Version 1.5.1 behaved the same way so it's not new.
    Of course I've figured out how to do everything I need through SQL but it would be handy if I could just use the tool.
    Thank you.

    Most of my tables are generated from a script so this morning I decided to just create a very basic partitioned table. It contained a NUMBER primary key and a TIMESTAMP(6) column to use with partitioning. That table worked just fine in SQL Developer.
    At that point I tried to figure out what is different about my tables and I finally found the difference... Oracle Spatial. If I add an MDSYS.SDO_GEOMETRY column to my partitioned table, SQL Developer starts having issues.
    I also have the GeoRaptor plugin installed so I had to wonder if it was interfering with SQL Developer. I couldn't find an option to uninstall an extension so I went into the sqldeveloper/extensions directory and removed GeoRaptorLibs and org.GeoRaptor.jar. GeoRaptor doesn't appear to be installed in SQL Developer anymore but I still see the same behavior.
    It appears that there is an issue in SQL Developer with Oracle Spatial and partitioning. Can someone confirm this?

  • Insert performance issue with Partitioned Table.....

    Hi All,
    I have a performance issue during with a table which is partitioned. without table being partitioned
    it ran in less time but after partition it took more than double.
    1) The table was created initially without any partition and the below insert took only 27 minuts.
    Total Rec Inserted :- 2424233
    PL/SQL procedure successfully completed.
    Elapsed: 00:27:35.20
    2) Now I re-created the table with partition(range yearly - below) and the same insert took 59 minuts.
    Is there anyway i can achive the better performance during insert on this partitioned table?
    [ similerly, I have another table with 50 Million records and the insert took 10 hrs without partition.
    with partitioning the table, it took 18 hours... ]
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 4195045590
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 643K| 34M| | 12917 (3)| 00:02:36 |
    |* 1 | HASH JOIN | | 643K| 34M| 2112K| 12917 (3)| 00:02:36 |
    | 2 | VIEW | index$_join$_001 | 69534 | 1290K| | 529 (3)| 00:00:07 |
    |* 3 | HASH JOIN | | | | | | |
    | 4 | INDEX FAST FULL SCAN| PK_ACCOUNT_MASTER_BASE | 69534 | 1290K| | 181 (3)| 00:00
    | 5 | INDEX FAST FULL SCAN| ACCOUNT_MASTER_BASE_IDX2 | 69534 | 1290K| | 474 (2)| 00:00
    PLAN_TABLE_OUTPUT
    | 6 | TABLE ACCESS FULL | TB_SISADMIN_BALANCE | 2424K| 87M| | 6413 (4)| 00:01:17 |
    Predicate Information (identified by operation id):
    1 - access("A"."VENDOR_ACCT_NBR"=SUBSTR("B"."ACCOUNT_NO",1,8) AND
    "A"."VENDOR_CD"="B"."COMPANY_NO")
    3 - access(ROWID=ROWID)
    Open C1;
    Loop
    Fetch C1 Bulk Collect Into C_Rectype Limit 10000;
    Forall I In 1..C_Rectype.Count
    Insert test
         col1,col2,col3)
    Values
         val1, val2,val3);
    V_Rec := V_Rec + Nvl(C_Rectype.Count,0);
    Commit;
    Exit When C_Rectype.Count = 0;
    C_Rectype.delete;
    End Loop;
    End;
    Total Rec Inserted :- 2424233
    PL/SQL procedure successfully completed.
    Elapsed: 00:51:01.22
    Edited by: user520824 on Jul 16, 2010 9:16 AM

    I'm concerned about the view in step 2 and the index join in step 3. A composite index with both columns might eliminate the index join and result in fewer read operations.
    If you know which partition the data is going into beforehand you can save a little bit of processing by specifying the partition (which may not be a scalable long-term solution) in the insert - I'm not 100% sure you can do this on inserts but I know you can on selects.
    The APPEND hint won't help the way you are using it - the VALUES clause in an insert makes it be ignored. Where it is effective and should help you is if you can do the insert in one query - insert into/select from. If you are using the loop to avoid filling up undo/rollback you can use a bulk collect to batch the selects and commit accordingly - but don't commit more often than you have to because more frequent commits slow transactions down.
    I don't think there is a nologging hint :)
    So, try something like
    insert /*+ hints */ into ...
    Select
         A.Ing_Acct_Nbr, currency_Symbol,
         Balance_Date,     Company_No,
         Substr(Account_No,1,8) Account_No,
         Substr(Account_No,9,1) Typ_Cd ,
         Substr(Account_No,10,1) Chk_Cd,
         Td_Balance,     Sd_Balance,
         Sysdate,     'Sisadmin'
    From Ideaal_Cons.Tb_Account_Master_Base A,
         Ideaal_Staging.Tb_Sisadmin_Balance B
    Where A.Vendor_Acct_Nbr = Substr(B.Account_No,1,8)
       And A.Vendor_Cd = b.company_no
          ;Edited by: riedelme on Jul 16, 2010 7:42 AM

  • Problems with partition tables

    Hi all,
    I've got some problems with partition tables. The script at the bottom run but when I wanna insert some values it returns me an error
    (ORA-06550: line 1, column 30: PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored)
    and I can't understand why!
    There's something incorrect in the script or not?
    Please help me
    Thanks in advance
    Steve
    CREATE TABLE TW_E_CUSTOMER_UNIFIED
    ID_CUSTOMER_UNIFIED VARCHAR2 (27) NOT NULL ,
    START_VALIDITY_DATE DATE NOT NULL ,
    END_VALIDITY_DATE DATE ,
    CUSTOMER_STATUS VARCHAR2 (255)
    PARTITION BY RANGE (START_VALIDITY_DATE)
    SUBPARTITION BY LIST (END_VALIDITY_DATE)
    PARTITION M200909 VALUES LESS THAN (TO_DATE('20091001','YYYYMMDD'))
    (SUBPARTITION M200909_N VALUES (NULL), SUBPARTITION M200909_NN VALUES (DEFAULT)),
    PARTITION M200910 VALUES LESS THAN (TO_DATE('20091101','YYYYMMDD'))
    (SUBPARTITION M200910_N VALUES (NULL), SUBPARTITION M200910_NN VALUES (DEFAULT)),
    PARTITION M200911 VALUES LESS THAN (TO_DATE('20091201','YYYYMMDD'))
    (SUBPARTITION M200911_N VALUES (NULL), SUBPARTITION M200911_NN VALUES (DEFAULT)),
    PARTITION M200912 VALUES LESS THAN (TO_DATE('20100101','YYYYMMDD'))
    (SUBPARTITION M200912_N VALUES (NULL), SUBPARTITION M200912_NN VALUES (DEFAULT)),
    PARTITION M201001 VALUES LESS THAN (TO_DATE('20100201','YYYYMMDD'))
    (SUBPARTITION M201001_N VALUES (NULL), SUBPARTITION M201001_NN VALUES (DEFAULT)),
    PARTITION M201002 VALUES LESS THAN (TO_DATE('20100301','YYYYMMDD'))
    (SUBPARTITION M201002_N VALUES (NULL), SUBPARTITION M201002_NN VALUES (DEFAULT)),
    PARTITION M210001 VALUES LESS THAN (MAXVALUE))
    (SUBPARTITION M210001_N VALUES (NULL), SUBPARTITION M210001_NN VALUES (DEFAULT))
    ;

    Hi Hoek,
    the DB version is 10.2 (italian version, then SET is correct).
    ...there's something strange: now I can INSERT rows but I can't update them!
    I'm using this command string:
    UPDATE TW_E_CUSTOMER_UNIFIED SET END_VALIDITY_DATE = TO_DATE('09-SET-09', 'DD-MON-RR') WHERE
    id_customer_unified = '123' and start_validity_date = TO_DATE('09-SET-09', 'DD-MON-RR');
    And this is the error:
    Error SQL: ORA-14402: updating partition key column would cause a partition change
    14402. 00000 - "updating partition key column would cause a partition change"
    *Cause:    An UPDATE statement attempted to change the value of a partition
    key column causing migration of the row to another partition
    *Action:   Do not attempt to update a partition key column or make sure that
    the new partition key is within the range containing the old
    partition key.
    I think that is impossible to use a PARTITION/SUBPARTITION like that: in fact the update of "END_VALIDITY_DATE" cause a partition change.
    Do u agree or it's possible an update on a field that implies a partition change?
    Regards Steve

  • Problems Faced with Partitions in Oracle 9i.

    I have a doubt regarding the partitions in Oracle 9i can you please help me regarding this?
    Create table t1
    ( x number,
    y number,
    z number);
    insert into t1 values (1,1,1);
    insert into t1 values (2,2,2);
    insert into t1 values (3,3,3);
    Create table t2
    x number,
    y number,
    z number
    partition by range(x)
    partition p1 values less than(2),
    partition p2 values less than(3),
    partition p3 values less than(4),
    partition p4 values less than(maxvalue)
    alter table t2 exchange partition p1 with table t1;
    SQL> alter table t2 exchange partition p1 with table t1;
    alter table t2 exchange partition p1 with table t1
    ERROR at line 1:
    ORA-14099: all rows in table do not qualify for specified partition
    WHAT DOES THIS ERROR MESSAGE MEAN? I AM NOT ABLE TO UNDERSTAND THIS? WHAT NEED's TO BE DONE TO RESOLVE THIS?
    alter table t2 exchange partition p1 with table t1 WITHOUT VALIDATION;
    SQL> SELECT * FROM T2;
    X Y Z
    1 1 1
    2 2 2
    3 3 3
    SQL> SELECT * FROM T2 PARTITION(P1);
    X Y Z
    1 1 1
    2 2 2
    3 3 3
    SQL> SELECT * FROM T2 PARTITION(P2);
    no rows selected
    SQL> SELECT * FROM T2 PARTITION(P3);
    no rows selected
    (i) Why i am facing this error ORA-14099: while partitioning? Can you please brief me about this ?
    (ii) why there is not data's in the PARTITIONS p2 &p3 after the partitions is exchanged WITHOUT VALIDATION options?
    what is going with this method?
    (iii) Also can you please explain me with an example how to partitions a table having milliion of records with EXCHANGE PARTITION Options with MULITPLE partition segment's (say partition based on status id column with 6 differnt values i am thinking to use list partitions using status_id as partition key) ?
    Also i have tried the below approch is this a right approch? please correct me if i am wrong.
    Create table t1
    ( x number,
    y number,
    z number);
    insert into t1 values (1,1,1);
    insert into t1 values (2,2,2);
    insert into t1 values (3,3,3);
    commit;
    Create table t2
    x number,
    y number,
    z number
    partition by range(x)
    partition p1 values less than(2),
    partition p2 values less than(3),
    partition p3 values less than(4),
    partition p4 values less than(maxvalue)
    SQL> insert into t2 select * from t1;
    3 rows created.
    SQL> commit;
    Commit complete.
    SQL> SELECT * FROM T2 PARTITION(P1);
    X Y Z
    1 1 1
    SQL> SELECT * FROM T2 PARTITION(P2);
    X Y Z
    2 2 2
    SQL> SELECT * FROM T2 PARTITION(P3);
    X Y Z
    3 3 3
    SQL> SELECT * FROM T2 PARTITION(P4);
    no rows selected
    EXPLAIN PLAN
    FOR SELECT * FROM T2 WHERE X = 1
    | Id | Operation | Name | Rows | Bytes | Cost | Pstart| Pstop |
    | 0 | SELECT STATEMENT | | 1 | 9 | 2 | | |
    | 1 | TABLE ACCESS FULL | T2 | 1 | 9 | 2 | 1 | 1 |
    Now my question is what is problem instead of using EXCHANGE PARTITION why caun't we follow this above approch?
    to partition a non-partitioned table?
    Thanks,
    Rajesh.

    The value of 3 should obviously should go into the partition P3.Then why are you putting it into p1?
    Your command,
    <tt>    alter table t2 exchange partition <b>p1</b> with table t1;</tt>
    will swap partition p1 with the contents of table t1, leaving you with partition p1 containing the three values that were in t1. At first it told you there were rows in t1 that did not belong in that partition, but you used FORCE so it put them in anyway.
    btw there are notes in the FAQ about how to use ** tags to format your posts.
    ~Edited by: William Robertson on Oct 15, 2008 6:49 AM~                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Is it possible to create table with partition in compress mode

    Hi All,
    I want to create a table in compress option, with partitions. When i create with partitions the compression isnt enabled, but with noramal table creation the compression option is enables.
    My question is:
    cant we create a table with partition/subpartition in compress mode..? Please help.
    Below is the code that i have used for table creation.
    CREATE TABLE temp
      TRADE_ID                    NUMBER,
      SRC_SYSTEM_ID               VARCHAR2(60 BYTE),
      SRC_TRADE_ID                VARCHAR2(60 BYTE),
      SRC_TRADE_VERSION           VARCHAR2(60 BYTE),
      ORIG_SRC_SYSTEM_ID          VARCHAR2(30 BYTE),
      TRADE_STATUS                VARCHAR2(60 BYTE),
      TRADE_TYPE                  VARCHAR2(60 BYTE),
      SECURITY_TYPE               VARCHAR2(60 BYTE),
      VOLUME                      NUMBER,
      ENTRY_DATE                  DATE,
        REASON                      VARCHAR2(255 BYTE),
    TABLESPACE data
    PCTUSED    0
    PCTFREE    10
    INITRANS   1
    MAXTRANS   255
    NOLOGGING
    COMPRESS
    NOCACHE
    PARALLEL (DEGREE 6 INSTANCES 1)
    MONITORING
    PARTITION BY RANGE (TRADE_DATE)
    SUBPARTITION BY LIST (SRC_SYSTEM_ID)
    SUBPARTITION TEMPLATE
      (SUBPARTITION SALES VALUES ('sales'),
       SUBPARTITION MAG VALUES ('MAG'),
       SUBPARTITION SPI VALUES ('SPI', 'SPIM', 'SPIIA'),
       SUBPARTITION FIS VALUES ('FIS'),
       SUBPARTITION GD VALUES ('GS'),
       SUBPARTITION ST VALUES ('ST'),
       SUBPARTITION KOR VALUES ('KOR'),
       SUBPARTITION BLR VALUES ('BLR'),
       SUBPARTITION SUT VALUES ('SUT'),
       SUBPARTITION RM VALUES ('RM'),
       SUBPARTITION DEFAULT VALUES (default)
    PARTITION RMS_TRADE_DLY_MAX VALUES LESS THAN (MAXVALUE)    
        LOGGING
            TABLESPACE data
         ( SUBPARTITION TS_MAX_SALES VALUES ('SALES')      TABLESPACE data,
        SUBPARTITION TS_MAX_MAG VALUES ('MAG')      TABLESPACE data,
        SUBPARTITION TS_MAX_SPI VALUES ('SPI', 'SPIM', 'SPIIA')      TABLESPACE data,
        SUBPARTITION TS_MAX_FIS VALUES ('FIS')      TABLESPACE data,
        SUBPARTITION TS_MAX_GS VALUES ('GS')      TABLESPACE data,
        SUBPARTITION TS_MAX_ST VALUES ('ST')      TABLESPACE data,
        SUBPARTITION TS_MAX_KOR VALUES ('KOR')      TABLESPACE data,
        SUBPARTITION TS_MAX_BLR VALUES ('BLR')      TABLESPACE data,
        SUBPARTITION TS_MAX_SUT VALUES ('SUT')      TABLESPACE data,
        SUBPARTITION TS_MAX_RM VALUES ('RM')      TABLESPACE data,
        SUBPARTITION TS_MAX_DEFAULT VALUES (default)      TABLESPACE data)); Edited by: user11942774 on 8 Dec, 2011 5:17 AM

    user11942774 wrote:
    I want to create a table in compress option, with partitions. When i create with partitions the compression isnt enabled, but with noramal table creation the compression option is enables. First of all your CREATE TABLE statement is full of syntax errors. Next time test it before posting - we don't want to spend time on fixing things not related to your question.
    Now, I bet you check COMPRESSION value of partitioned table same way you do it for a non-partitioned table - in USER_TABLES - and therefore get wrong results. Since compreesion can be enabled on individual partition level you need to check COMPRESSION in USER_TAB_PARTITIONS:
    SQL> CREATE TABLE temp
      2  (
      3    TRADE_ID                    NUMBER,
      4    SRC_SYSTEM_ID               VARCHAR2(60 BYTE),
      5    SRC_TRADE_ID                VARCHAR2(60 BYTE),
      6    SRC_TRADE_VERSION           VARCHAR2(60 BYTE),
      7    ORIG_SRC_SYSTEM_ID          VARCHAR2(30 BYTE),
      8    TRADE_STATUS                VARCHAR2(60 BYTE),
      9    TRADE_TYPE                  VARCHAR2(60 BYTE),
    10    SECURITY_TYPE               VARCHAR2(60 BYTE),
    11    VOLUME                      NUMBER,
    12    ENTRY_DATE                  DATE,
    13      REASON                      VARCHAR2(255 BYTE),
    14    TRADE_DATE                  DATE
    15  )
    16  TABLESPACE users
    17  PCTUSED    0
    18  PCTFREE    10
    19  INITRANS   1
    20  MAXTRANS   255
    21  NOLOGGING
    22  COMPRESS
    23  NOCACHE
    24  PARALLEL (DEGREE 6 INSTANCES 1)
    25  MONITORING
    26  PARTITION BY RANGE (TRADE_DATE)
    27  SUBPARTITION BY LIST (SRC_SYSTEM_ID)
    28  SUBPARTITION TEMPLATE
    29    (SUBPARTITION SALES VALUES ('sales'),
    30     SUBPARTITION MAG VALUES ('MAG'),
    31     SUBPARTITION SPI VALUES ('SPI', 'SPIM', 'SPIIA'),
    32     SUBPARTITION FIS VALUES ('FIS'),
    33     SUBPARTITION GD VALUES ('GS'),
    34     SUBPARTITION ST VALUES ('ST'),
    35     SUBPARTITION KOR VALUES ('KOR'),
    36     SUBPARTITION BLR VALUES ('BLR'),
    37     SUBPARTITION SUT VALUES ('SUT'),
    38     SUBPARTITION RM VALUES ('RM'),
    39     SUBPARTITION DEFAULT_SUB VALUES (default)
    40    )  
    41  (  
    42   PARTITION RMS_TRADE_DLY_MAX VALUES LESS THAN (MAXVALUE)    
    43      LOGGING
    44          TABLESPACE users
    45       ( SUBPARTITION TS_MAX_SALES VALUES ('SALES')      TABLESPACE users,
    46      SUBPARTITION TS_MAX_MAG VALUES ('MAG')      TABLESPACE users,
    47      SUBPARTITION TS_MAX_SPI VALUES ('SPI', 'SPIM', 'SPIIA')      TABLESPACE users,
    48      SUBPARTITION TS_MAX_FIS VALUES ('FIS')      TABLESPACE users,
    49      SUBPARTITION TS_MAX_GS VALUES ('GS')      TABLESPACE users,
    50      SUBPARTITION TS_MAX_ST VALUES ('ST')      TABLESPACE users,
    51      SUBPARTITION TS_MAX_KOR VALUES ('KOR')      TABLESPACE users,
    52      SUBPARTITION TS_MAX_BLR VALUES ('BLR')      TABLESPACE users,
    53      SUBPARTITION TS_MAX_SUT VALUES ('SUT')      TABLESPACE users,
    54      SUBPARTITION TS_MAX_RM VALUES ('RM')      TABLESPACE users,
    55      SUBPARTITION TS_MAX_DEFAULT VALUES (default)      TABLESPACE users));
    Table created.
    SQL>
    SQL>
    SQL> SELECT  PARTITION_NAME,
      2          COMPRESSION
      3    FROM USER_TAB_PARTITIONS
      4    WHERE TABLE_NAME = 'TEMP'
      5  /
    PARTITION_NAME                 COMPRESS
    RMS_TRADE_DLY_MAX              ENABLED
    SQL> SELECT  COMPRESSION
      2    FROM USER_TABLES
      3    WHERE TABLE_NAME = 'TEMP'
      4  /
    COMPRESS
    SQL> SY.

  • Installation of ISO: With partitioning already done, where do I start?

    The document I refer to is: http://ebalaskas.gr/wiki/archlinux/netinstall#h254-14
    My question is:
    Given that I have already used gparted to create a bootable partition, can I forego the first stages of the install procedure as set forth in the wiki
    (which are all to do with partitioning, and creating a swap file) and proceed straight to the install?
    If so, does that mean that my first task is to create mount points?
    Thanks in advance for any help.
    Last edited by textillis (2013-06-03 14:12:12)

    textillis wrote:
    Listen pal, FYI: I took that site from an earlier respondent to this thread.
    I am just trying to get oriented around here: your tone comes across as condescending, then finally just boorish.
    Is that how you wish to come across?
    (does the trilby go with braces, lederhosen and a very short, centred moustache?)
    Following that rhetorical question with an example of Godwin's law undermines the whole post.
    Please keep in mind that tone is often lost in online posts. Trilby's point is correct and intended to steer you in the right direction. We only offer support on this forum for the "official" installation guides. If you want to follow something else then you are free to do so, but we cannot help you with that, only the author can. Obviously we recommend the official guides and wiki. They are the most accurate and up-to-date.
    I'd also like to ask you to please stop top-posting when you quote others.
    *pulls out braces with thumbs and struts off in lederhosen*

  • Problem with partitioning - disk permanently falls back to old p-table

    Hey Guys!
    I'm quite desperate and can't find answers for the following problem - maybe some of you already had a similiar problem.
    I want to reuse a SSD that I used on a different machine as primary system drive. It's partition-table:
    # fdisk -l /dev/sda
    Disk /dev/sda: 119.2 GiB, 128035676160 bytes, 250069680 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x0004f0e5
    Device     Boot  Start       End   Sectors  Size Id Type
    /dev/sda1  *      2048    499711    497664  243M 83 Linux
    /dev/sda2       501758 250068991 249567234  119G  5 Extended
    /dev/sda5       501760 250068991 249567232  119G 8e Linux LVM
    There is a LVM volume group with two volumes (root and swap) on sda5. No matter how I try to destroy the LVM setup and the partitioning, it is always "reseted" to this setup.
    I tried: lvremove, vgremove, pvremove, fdisk, cfdisk, gdisk, cgdisk, dd from /dev/null, testdisk - with and without reboots, from arch-linux booted from usb and from an ubuntu-live-cd. No matter what, the partitioning does not change.
    Why I want to reformat it? I want to use the drive as cache for zfs-on-linux.
    It feels like the drive is somehow write-protected.
    Has anyone suggestions what to try next?

    Thanks @ROOKIE
    Sadly didn't work either - see below. Underneath I added results of smart-tests - maybe I miss something.
    $ sudo lsblk
    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda      8:0    0 119.2G  0 disk
    |-sda1   8:1    0   243M  0 part
    |-sda2   8:2    0     1K  0 part
    `-sda5   8:5    0   119G  0 part
    sdc      8:32   1   7.4G  0 disk
    |-sdc1   8:33   1   512M  0 part
    `-sdc2   8:34   1   6.9G  0 part
    sdd      8:48   1   7.4G  0 disk
    |-sdd1   8:49   1   512M  0 part /boot
    `-sdd2   8:50   1   6.9G  0 part
    sr0     11:0    1  1024M  0 rom 
    zram0  254:0    0  75.1M  0 disk [SWAP]
    zram1  254:1    0  75.1M  0 disk [SWAP]
    zram2  254:2    0  75.1M  0 disk [SWAP]
    zram3  254:3    0  75.1M  0 disk [SWAP]
    $ sudo blkdiscard -v /dev/sda
    /dev/sda: Discarded 128035676160 bytes from the offset 0
    $ sudo blkdiscard -v /dev/sda
    /dev/sda: Discarded 128035676160 bytes from the offset 0
    $ sudo fdisk /dev/sda
    Welcome to fdisk (util-linux 2.26.1).                                                                                                                                                                                   
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.
    Command (m for help): o
    Created a new DOS disklabel with disk identifier 0x591d429c.
    Command (m for help): w
    The partition table has been altered.
    Calling ioctl() to re-read partition table.
    Syncing disks.
    $ lsblk
    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda      8:0    0 119.2G  0 disk
    |-sda1   8:1    0   243M  0 part
    |-sda2   8:2    0     1K  0 part
    `-sda5   8:5    0   119G  0 part
    sdc      8:32   1   7.4G  0 disk
    |-sdc1   8:33   1   512M  0 part
    `-sdc2   8:34   1   6.9G  0 part
    sdd      8:48   1   7.4G  0 disk
    |-sdd1   8:49   1   512M  0 part /boot
    `-sdd2   8:50   1   6.9G  0 part
    sr0     11:0    1  1024M  0 rom 
    zram0  254:0    0  75.1M  0 disk [SWAP]
    zram1  254:1    0  75.1M  0 disk [SWAP]
    zram2  254:2    0  75.1M  0 disk [SWAP]
    zram3  254:3    0  75.1M  0 disk [SWAP]
    $ sudo blkdiscard -v /dev/sda
    /dev/sda: Discarded 128035676160 bytes from the offset 0
    $ lsblk
    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda      8:0    0 119.2G  0 disk
    |-sda1   8:1    0   243M  0 part
    |-sda2   8:2    0     1K  0 part
    `-sda5   8:5    0   119G  0 part
    sdc      8:32   1   7.4G  0 disk
    |-sdc1   8:33   1   512M  0 part
    `-sdc2   8:34   1   6.9G  0 part
    sdd      8:48   1   7.4G  0 disk
    |-sdd1   8:49   1   512M  0 part /boot
    `-sdd2   8:50   1   6.9G  0 part
    sr0     11:0    1  1024M  0 rom 
    zram0  254:0    0  75.1M  0 disk [SWAP]
    zram1  254:1    0  75.1M  0 disk [SWAP]
    zram2  254:2    0  75.1M  0 disk [SWAP]
    zram3  254:3    0  75.1M  0 disk [SWAP]
    I checked smart too now:
    $ sudo smartctl -t long /dev/sda
    smartctl 6.3 2014-07-26 r3976 [x86_64-linux-3.19.3-3-ARCH] (local build)
    Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
    === START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
    Sending command: "Execute SMART Extended self-test routine immediately in off-line mode".
    Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful.
    Testing has begun.
    Please wait 1 minutes for test to complete.
    Test will complete after Fri Apr 17 12:22:27 2015
    Use smartctl -X to abort test.
    $ sudo smartctl -H /dev/sda
    smartctl 6.3 2014-07-26 r3976 [x86_64-linux-3.19.3-3-ARCH] (local build)
    Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED
    $ sudo smartctl -a /dev/sda
    smartctl 6.3 2014-07-26 r3976 [x86_64-linux-3.19.3-3-ARCH] (local build)
    Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
    === START OF INFORMATION SECTION ===
    Model Family:     JMicron based SSDs
    Device Model:     KINGSTON SNV425S2128GB
    Serial Number:    07WA50010371
    Firmware Version: D100309a
    User Capacity:    128,035,676,160 bytes [128 GB]
    Sector Size:      512 bytes logical/physical
    Rotation Rate:    Solid State Device
    Form Factor:      2.5 inches
    Device is:        In smartctl database [for details use: -P show]
    ATA Version is:   ATA8-ACS (minor revision not indicated)
    SATA Version is:  SATA 2.6, 3.0 Gb/s
    Local Time is:    Fri Apr 17 12:31:57 2015 CEST
    SMART support is: Available - device has SMART capability.
    SMART support is: Enabled
    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED
    General SMART Values:
    Offline data collection status:  (0x00) Offline data collection activity
                                            was never started.
                                            Auto Offline Data Collection: Disabled.
    Self-test execution status:      (   0) The previous self-test routine completed
                                            without error or no self-test has ever
                                            been run.
    Total time to complete Offline
    data collection:                (   30) seconds.
    Offline data collection
    capabilities:                    (0x1b) SMART execute Offline immediate.
                                            Auto Offline data collection on/off support.
                                            Suspend Offline collection upon new
                                            command.
                                            Offline surface scan supported.
                                            Self-test supported.
                                            No Conveyance Self-test supported.
                                            No Selective Self-test supported.
    SMART capabilities:            (0x0003) Saves SMART data before entering
                                            power-saving mode.
                                            Supports SMART auto save timer.
    Error logging capability:        (0x01) Error logging supported.
                                            General Purpose Logging supported.
    Short self-test routine
    recommended polling time:        (   1) minutes.
    Extended self-test routine
    recommended polling time:        (   1) minutes.
    SMART Attributes Data Structure revision number: 16
    Vendor Specific SMART Attributes with Thresholds:
    ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
      1 Raw_Read_Error_Rate     0x000b   100   100   050    Pre-fail  Always       -       0
      2 Throughput_Performance  0x0005   100   100   050    Pre-fail  Offline      -       0
      3 Unknown_Attribute       0x0007   100   100   050    Pre-fail  Always       -       0
      5 Reallocated_Sector_Ct   0x0013   100   100   050    Pre-fail  Always       -       0
      7 Unknown_Attribute       0x000b   100   100   050    Pre-fail  Always       -       0
      8 Unknown_Attribute       0x0005   100   100   050    Pre-fail  Offline      -       0
      9 Power_On_Hours          0x0012   100   100   000    Old_age   Always       -       12054
    10 Unknown_Attribute       0x0013   100   100   050    Pre-fail  Always       -       0
    12 Power_Cycle_Count       0x0012   100   100   000    Old_age   Always       -       5448
    168 SATA_Phy_Error_Count    0x0012   100   100   000    Old_age   Always       -       0
    175 Bad_Cluster_Table_Count 0x0003   100   100   010    Pre-fail  Always       -       29
    192 Unexpect_Power_Loss_Ct  0x0012   100   100   000    Old_age   Always       -       0
    194 Temperature_Celsius     0x0022   052   100   020    Old_age   Always       -       52 (Min/Max 29/52)
    197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
    240 Unknown_Attribute       0x0013   100   100   050    Pre-fail  Always       -       0
    170 Bad_Block_Count         0x0003   100   100   010    Pre-fail  Always       -       144 329 118
    173 Erase_Count             0x0012   100   100   000    Old_age   Always       -       6399 10521 7887
    SMART Error Log Version: 1
    ATA Error Count: 153 (device log contains only the most recent five errors)
            CR = Command Register [HEX]
            FR = Features Register [HEX]
            SC = Sector Count Register [HEX]
            SN = Sector Number Register [HEX]
            CL = Cylinder Low Register [HEX]
            CH = Cylinder High Register [HEX]
            DH = Device/Head Register [HEX]
            DC = Device Command Register [HEX]
            ER = Error register [HEX]
            ST = Status register [HEX]
    Powered_Up_Time is measured from power on, and printed as
    DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
    SS=sec, and sss=millisec. It "wraps" after 49.710 days.
    Error 153 occurred at disk power-on lifetime: 11818 hours (492 days + 10 hours)
      When the command that caused the error occurred, the device was active or idle.
      After command completion occurred, registers were:
      ER ST SC SN CL CH DH
      40 51 00 28 66 d3 eb  Error: UNC at LBA = 0x0bd36628 = 198403624
      Commands leading to the command that caused the error were:
      CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
      c8 00 08 28 66 d3 eb 08  36d+21:07:12.000  READ DMA
      ec 00 00 00 00 00 a0 08  36d+21:07:12.000  IDENTIFY DEVICE
      ef 03 45 00 00 00 a0 08  36d+21:07:12.000  SET FEATURES [Set transfer mode]
      ec 00 00 00 00 00 a0 08  36d+21:07:12.000  IDENTIFY DEVICE
      c8 00 08 28 66 d3 eb 08  36d+21:07:12.000  READ DMA
    Error 152 occurred at disk power-on lifetime: 11818 hours (492 days + 10 hours)
      When the command that caused the error occurred, the device was active or idle.
      After command completion occurred, registers were:
      ER ST SC SN CL CH DH
      40 51 00 28 66 d3 eb  Error: UNC at LBA = 0x0bd36628 = 198403624
      Commands leading to the command that caused the error were:
      CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
      c8 00 08 28 66 d3 eb 08  36d+21:07:12.000  READ DMA
      c8 00 08 20 66 d3 eb 08  36d+21:07:12.000  READ DMA
      c8 00 08 18 66 d3 eb 08  36d+21:07:12.000  READ DMA
      c8 00 08 10 66 d3 eb 08  36d+21:07:12.000  READ DMA
      c8 00 08 08 66 d3 eb 08  36d+21:07:12.000  READ DMA
    Error 151 occurred at disk power-on lifetime: 11818 hours (492 days + 10 hours)
      When the command that caused the error occurred, the device was active or idle.
      After command completion occurred, registers were:
      ER ST SC SN CL CH DH
      40 51 00 00 66 d3 eb  Error: UNC at LBA = 0x0bd36600 = 198403584
      Commands leading to the command that caused the error were:
      CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
      c8 00 00 00 66 d3 eb 08  36d+21:07:12.000  READ DMA
      c8 00 00 00 65 d3 eb 08  36d+21:07:12.000  READ DMA
      c8 00 00 00 64 d3 eb 08  36d+21:07:12.000  READ DMA
      c8 00 00 00 63 d3 eb 08  36d+21:07:12.000  READ DMA
      c8 00 00 00 62 d3 eb 08  36d+21:07:12.000  READ DMA
    Error 150 occurred at disk power-on lifetime: 6211 hours (258 days + 19 hours)
      When the command that caused the error occurred, the device was active or idle.
      After command completion occurred, registers were:
      ER ST SC SN CL CH DH
      40 51 00 a8 f6 75 eb  Error: UNC at LBA = 0x0b75f6a8 = 192280232
      Commands leading to the command that caused the error were:
      CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
      c8 00 08 a8 f6 75 eb 08      04:55:01.600  READ DMA
      ec 00 00 00 00 00 a0 08      04:55:01.600  IDENTIFY DEVICE
      ef 03 45 00 00 00 a0 08      04:55:01.600  SET FEATURES [Set transfer mode]
      ec 00 00 00 00 00 a0 08      04:55:01.600  IDENTIFY DEVICE
      c8 00 08 a8 f6 75 eb 08      04:55:01.500  READ DMA
    Error 149 occurred at disk power-on lifetime: 6211 hours (258 days + 19 hours)
      When the command that caused the error occurred, the device was active or idle.
      After command completion occurred, registers were:
      ER ST SC SN CL CH DH
      40 51 00 a8 f6 75 eb  Error: UNC at LBA = 0x0b75f6a8 = 192280232
      Commands leading to the command that caused the error were:
      CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
      c8 00 08 a8 f6 75 eb 08      04:55:01.500  READ DMA
      c8 00 08 a0 f6 75 eb 08      04:55:01.500  READ DMA
      c8 00 08 98 f6 75 eb 08      04:55:01.500  READ DMA
      c8 00 08 90 f6 75 eb 08      04:55:01.500  READ DMA
      c8 00 08 88 f6 75 eb 08      04:55:01.500  READ DMA
    SMART Self-test log structure revision number 1
    Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
    # 1  Extended offline    Completed without error       00%     12054         -
    # 2  Extended offline    Completed without error       00%     11117         -
    # 3  Short offline       Completed without error       00%     11116         -
    # 4  Extended offline    Completed without error       00%     11100         -
    # 5  Short offline       Completed without error       00%      6804         -
    # 6  Short offline       Completed without error       00%      2818         -
    # 7  Short offline       Completed without error       00%      2750         -
    # 8  Short offline       Completed without error       00%      2744         -
    # 9  Short offline       Aborted by host               00%      2521         -
    #10  Short offline       Completed without error       00%      2448         -
    #11  Short offline       Completed without error       00%      2290         -
    #12  Short offline       Completed without error       00%      2120         -
    #13  Short offline       Completed without error       00%      2021         -
    #14  Short offline       Completed without error       00%      1936         -
    #15  Short offline       Completed without error       00%      1859         -
    #16  Short offline       Completed without error       00%      1823         -
    #17  Short offline       Completed without error       00%      1727         -
    #18  Short offline       Completed without error       00%      1687         -
    #19  Short offline       Completed without error       00%      1580         -
    #20  Short offline       Completed without error       00%      1292         -
    #21  Short offline       Completed without error       00%      1245         -
    Selective Self-tests/Logging not supported

  • Degraded Performance with Partitioning

    We are using Oracle 11.2.0.3 on Solaris. There is a view defined on a few tables. Because of its complexness and the size of tables, the performance of the view is not good. So, I changed two of the tables to partitioned tables, list-partitioned by year. All indexes on these two tables were changed to local partitioned, with year as the leading index keys. Statistics on all tables and indexes were collected. I then created a new view with the two tables replaced with the partitioned ones. I also ran SQL Tuning advisor and created recommended indexes. I hoped the new view would be faster than the old one, but the fact is the opposite.
    The old view has order-by clause. If I remove the order-by in the new view, the elapsed time is close to the old one which has order-by. With "select * from new-view order by ...", or even a "select count(*) from new-view", I never got a return in few hours.
    SQL Tuning Advisor shows partition-pruning, all operations are on one partition, and the only recommendation now is accepting SQL profile. I don't understand why partitioning has such a bad result. This is really frustrating to me. Not sure if anyone here experienced something similar, or know there is an Oracle bug, or can tell me where I am lost.
    Appreciate your advice.
    Gary
    Edited by: user12131557 on Feb 25, 2013 3:15 PM

    This is the old plan. Again, please replace # with seven spaces to read.
    | Id  | Operation#######   | Name###      | Rows  | Bytes |TempSpc| Cost  |
    |   0 | SELECT STATEMENT######   |####    |#|#|#| 50259 |
    |   1 |  SORT ORDER BY######     |####    |    27 | 21951 |#| 50259 |
    |   2 |   VIEW#######      | VW_BCZC_REPORT##   |    27 | 21951 |#| 50233 |
    |   3 |    SORT ORDER BY######   |####    |    27 |  8937 |#| 50233 |
    |   4 |     NESTED LOOPS OUTER#####    |####    |    27 |  8937 |#| 50207 |
    |*  5 |      HASH JOIN OUTER#####      |####    |    27 |  7614 |#| 50167 |
    |*  6 |#HASH JOIN######    |####    |    27 |  6291 |#| 46428 |
    |   7 |# TABLE ACCESS FULL#####  | HSD_SUMMARY_OUTPUT#      |   762 | 21336 |#|     4 |
    |*  8 |# HASH JOIN######   |####    | 44145 |  8837K|#| 46421 |
    |   9 |#  TABLE ACCESS FULL##### | HSD_LOOKUP###|   132 |  6732 |#|     3 |
    |* 10 |#  HASH JOIN######  |####    | 43142 |  6488K|#| 46417 |
    |  11 |#   TABLE ACCESS FULL#####| HSD_COUNTY###|  3227 | 74221 |#|     4 |
    |* 12 |#   HASH JOIN###### |####    | 43142 |  5519K|#| 46406 |
    |  13 |#    VIEW######     |####    |     4 |    56 |#|   208 |
    |  14 |#     SORT UNIQUE#####    |####    |     4 |   406 |#|   208 |
    |  15 |#      UNION-ALL#####     |####    |#|#|#|#|
    |* 16 |##FILTER######|####    |#|#|#|#|
    |  17 |## SORT GROUP BY####      |####    |     1 |   109 |#|    67 |
    |  18 |##  NESTED LOOPS####      |####    |     1 |   109 |#|    18 |
    |  19 |##   NESTED LOOPS####     |####    |     1 |    67 |#|    17 |
    |* 20 |##    INDEX FULL SCAN#### | HSD_SUMMARY_OUTPUT_INDX3#|    10 |   230 |#|     2 |
    |  21 |##    TABLE ACCESS BY INDEX ROWID##   | CONTRACT_X_COUNTY##|     1 |    44 |#|     2 |
    |* 22 |##     INDEX RANGE SCAN###      | CONTRACT_X_COUNTY_APP_ID_IDX   |     1 |#|#|     1 |
    |* 23 |##   INDEX RANGE SCAN#### | CONTRACT_X_COUNTY_PK#    |     1 |    42 |#|     1 |
    |* 24 |##FILTER######|####    |#|#|#|#|
    |  25 |## SORT GROUP BY####      |####    |     1 |   106 |#|    62 |
    |  26 |##  NESTED LOOPS####      |####    |     1 |   106 |#|    13 |
    |  27 |##   NESTED LOOPS####     |####    |     1 |    64 |#|    12 |
    |* 28 |##    INDEX FULL SCAN#### | HSD_SUMMARY_OUTPUT_INDX3#|    10 |   230 |#|     2 |
    |* 29 |##    TABLE ACCESS BY INDEX ROWID##   | CONTRACT_X_PARTIAL_ZIPCODE     |     1 |    41 |#|     1 |
    |* 30 |##     INDEX RANGE SCAN###      | CONTRACT_X_PAR_ZIP_APP_ID_IDX  |     1 |#|#|     1 |
    |* 31 |##   INDEX RANGE SCAN#### | CONTRACT_X_PARTIAL_ZIPCODE_PK  |     1 |    42 |#|     1 |
    |* 32 |##FILTER######|####    |#|#|#|#|
    |  33 |## NESTED LOOPS#####|####    |     1 |    94 |#|     8 |
    |  34 |##  NESTED LOOPS####      |####    |     1 |    72 |#|     6 |
    |  35 |##   NESTED LOOPS####     |####    |     1 |    63 |#|     5 |
    |  36 |##    NESTED LOOPS####    |####    |     1 |    52 |#|     4 |
    |* 37 |##     TABLE ACCESS BY INDEX ROWID##  | CONTRACT_INFORMATION#    |     1 |    25 |#|     3 |
    |* 38 |##      INDEX RANGE SCAN###     | IX2_CONTRACT_INFORMATION#|     1 |#|#|     2 |
    |  39 |###SORT AGGREGATE###      |####    |     1 |    22 |#|#|
    |  40 |### FIRST ROW####   |####    |     1 |    22 |#|     1 |
    |* 41 |###  INDEX RANGE SCAN (MIN/MAX)#      | CONTRACT_INFORMATION_PK# |     1 |    22 |#|     1 |
    |* 42 |##     TABLE ACCESS BY INDEX ROWID##  | CONTRACT_X_REGION##|     1 |    27 |#|     1 |
    |* 43 |##      INDEX RANGE SCAN###     | CONTRACT_X_REGION_PK#    |     1 |#|#|     1 |
    |* 44 |##    INDEX RANGE SCAN####| HSD_SUMMARY_OUTPUT_INDX4#|     1 |    11 |#|     1 |
    |  45 |##   TABLE ACCESS BY INDEX ROWID##    | STATES###    |     1 |     9 |#|     1 |
    |* 46 |##    INDEX RANGE SCAN####| STATES_INDX2##     |     2 |#|#|     1 |
    |* 47 |##  TABLE ACCESS BY INDEX ROWID##     | COUNTIES###  |     2 |    44 |#|     2 |
    |* 48 |##   INDEX RANGE SCAN#### | COUNTIES_INDX_4##  |    54 |#|#|     1 |
    |  49 |## SORT AGGREGATE####     |####    |     1 |    25 |#|#|
    |* 50 |##  TABLE ACCESS BY INDEX ROWID##     | CONTRACT_X_REGION##|     1 |    25 |#|     1 |
    |* 51 |##   INDEX RANGE SCAN#### | IX1_CONTRACT_X_REGION#   |     1 |#|#|     1 |
    |* 52 |##FILTER######|####    |#|#|#|#|
    |  53 |## NESTED LOOPS#####|####    |     1 |    97 |#|    18 |
    |  54 |##  NESTED LOOPS####      |####    |     1 |    75 |#|    16 |
    |  55 |##   NESTED LOOPS####     |####    |     1 |    66 |#|    15 |
    |  56 |##    NESTED LOOPS####    |####    |     4 |   152 |#|    11 |
    |* 57 |##     INDEX RANGE SCAN###      | IX1_HSD_SUMMARY_OUTPUT#  |    10 |   110 |#|     1 |
    |* 58 |##     TABLE ACCESS BY INDEX ROWID##  | CONTRACT_X_REGION##|     1 |    27 |#|     1 |
    |* 59 |##      INDEX RANGE SCAN###     | CONTRACT_X_REGION_PK#    |     1 |#|#|     1 |
    |* 60 |##    TABLE ACCESS BY INDEX ROWID##   | CONTRACT_INFORMATION#    |     1 |    28 |#|     1 |
    |* 61 |##     INDEX RANGE SCAN###      | CONTRACT_INFORMATION_PK# |     1 |#|#|     1 |
    |  62 |##      SORT AGGREGATE####|####    |     1 |    22 |#|#|
    |  63 |###FIRST ROW####    |####    |     1 |    22 |#|     1 |
    |* 64 |### INDEX RANGE SCAN (MIN/MAX)##| CONTRACT_INFORMATION_PK# |     1 |    22 |#|     1 |
    |  65 |##   TABLE ACCESS BY INDEX ROWID##    | STATES###    |     1 |     9 |#|     1 |
    |* 66 |##    INDEX RANGE SCAN####| STATES_INDX1##     |     1 |#|#|     1 |
    |* 67 |##  TABLE ACCESS BY INDEX ROWID##     | COUNTIES###  |     2 |    44 |#|     2 |
    |* 68 |##   INDEX RANGE SCAN#### | COUNTIES_INDX_4##  |    54 |#|#|     1 |
    |  69 |## SORT AGGREGATE####     |####    |     1 |    25 |#|#|
    |* 70 |##  TABLE ACCESS BY INDEX ROWID##     | CONTRACT_X_REGION##|     1 |    25 |#|     1 |
    |* 71 |##   INDEX RANGE SCAN#### | IX1_CONTRACT_X_REGION#   |     1 |#|#|     1 |
    |  72 |#    VIEW######     |####    |  1078K|   120M|#| 46189 |
    |  73 |#     SORT GROUP BY#####  |####    |  1078K|   120M|#| 46189 |
    |  74 |#      VIEW######   |####    |  1078K|   120M|#| 35578 |
    |  75 |##SORT UNIQUE#####  |####    |  1078K|   147M|   324M| 35578 |
    |  76 |## UNION-ALL#####   |####    |#|#|#|#|
    |* 77 |##  FILTER#####     |####    |#|#|#|#|
    |* 78 |##   HASH JOIN OUTER####  |####    |  1078K|   147M|   141M|  5496 |
    |  79 |##    VIEW#####     |####    |  1078K|   129M|#|  1082 |
    |* 80 |##     HASH JOIN####      |####    |  1078K|    46M|#|  1082 |
    |  81 |##      INDEX FULL SCAN###      | HSD_SUMMARY_OUTPUT_INDX3#|   762 | 11430 |#|     2 |
    |  82 |##      TABLE ACCESS FULL###    | HSD_NCB_OUTPUT##   |  1078K|    30M|#|  1071 |
    |  83 |##    VIEW#####     |####    |     5 |    85 |#|  2152 |
    |  84 |##     SORT UNIQUE####    |####    |     5 |   262 |#|  2152 |
    |  85 |##      UNION-ALL####     |####    |#|#|#|#|
    |  86 |###VIEW#####  |####    |     4 |    68 |#|   203 |
    |  87 |### SORT UNIQUE#### |####    |     4 |   398 |#|   203 |
    |  88 |###  UNION-ALL####  |####    |#|#|#|#|
    |* 89 |###   FILTER####    |####    |#|#|#|#|
    |  90 |###    SORT GROUP BY###   |####    |     1 |   107 |#|    62 |
    |  91 |###     NESTED LOOPS###   |####    |     1 |   107 |#|    13 |
    |  92 |###      NESTED LOOPS###  |####    |     1 |    65 |#|    12 |
    |* 93 |####INDEX FULL SCAN##     | HSD_SUMMARY_OUTPUT_INDX3#|    10 |   230 |#|     2 |
    |* 94 |####INDEX RANGE SCAN##    | CONTRACT_X_COUNTY_APP_ID_IDX   |     1 |    42 |#|     1 |
    |* 95 |###      INDEX RANGE SCAN##     | CONTRACT_X_COUNTY_PK#    |     1 |    42 |#|     1 |
    |* 96 |###   FILTER####    |####    |#|#|#|#|
    |  97 |###    SORT GROUP BY###   |####    |     1 |   104 |#|    62 |
    |  98 |###     NESTED LOOPS###   |####    |     1 |   104 |#|    13 |
    |  99 |###      NESTED LOOPS###  |####    |     1 |    62 |#|    12 |
    |*100 |####INDEX FULL SCAN##     | HSD_SUMMARY_OUTPUT_INDX3#|    10 |   230 |#|     2 |
    |*101 |####TABLE ACCESS BY INDEX ROWID#| CONTRACT_X_PARTIAL_ZIPCODE     |     1 |    39 |#|     1 |
    |*102 |#### INDEX RANGE SCAN##   | CONTRACT_X_PAR_ZIP_APP_ID_IDX  |     1 |#|#|     1 |
    |*103 |###      INDEX RANGE SCAN##     | CONTRACT_X_PARTIAL_ZIPCODE_PK  |     1 |    42 |#|     1 |
    |*104 |###   FILTER####    |####    |#|#|#|#|
    |*105 |###    FILTER####   |####    |#|#|#|#|
    | 106 |###     NESTED LOOPS###   |####    |     1 |    92 |#|     8 |
    | 107 |###      NESTED LOOPS###  |####    |     1 |    70 |#|     6 |
    | 108 |####NESTED LOOPS### |####    |     1 |    61 |#|     5 |
    | 109 |#### NESTED LOOPS###|####    |     1 |    50 |#|     4 |
    |*110 |####  TABLE ACCESS BY INDEX ROWID     | CONTRACT_INFORMATION#    |     1 |    25 |#|     3 |
    |*111 |####   INDEX RANGE SCAN## | IX2_CONTRACT_INFORMATION#|     1 |#|#|     2 |
    | 112 |####    SORT AGGREGATE##  |####    |     1 |    22 |#|#|
    | 113 |####     FIRST ROW##      |####    |     1 |    22 |#|     1 |
    |*114 |####      INDEX RANGE SCAN (MIN/MAX)  | CONTRACT_INFORMATION_PK# |     1 |    22 |#|     1 |
    |*115 |####  TABLE ACCESS BY INDEX ROWID     | CONTRACT_X_REGION##|     1 |    25 |#|     1 |
    |*116 |####   INDEX RANGE SCAN## | CONTRACT_X_REGION_PK#    |     1 |#|#|     1 |
    |*117 |#### INDEX RANGE SCAN##   | HSD_SUMMARY_OUTPUT_INDX4#|     1 |    11 |#|     1 |
    | 118 |####TABLE ACCESS BY INDEX ROWID#| STATES###    |     1 |     9 |#|     1 |
    |*119 |#### INDEX RANGE SCAN##   | STATES_INDX2##     |     2 |#|#|     1 |
    |*120 |###      TABLE ACCESS BY INDEX ROWID# | COUNTIES###  |     2 |    44 |#|     2 |
    |*121 |####INDEX RANGE SCAN##    | COUNTIES_INDX_4##  |    54 |#|#|     1 |
    | 122 |###    SORT AGGREGATE###  |####    |     1 |    25 |#|#|
    |*123 |###     TABLE ACCESS BY INDEX ROWID#  | CONTRACT_X_REGION##|     1 |    25 |#|     1 |
    |*124 |###      INDEX RANGE SCAN##     | IX1_CONTRACT_X_REGION#   |     1 |#|#|     1 |
    |*125 |###   FILTER####    |####    |#|#|#|#|
    |*126 |###    FILTER####   |####    |#|#|#|#|
    | 127 |###     NESTED LOOPS###   |####    |     1 |    95 |#|    18 |
    | 128 |###      NESTED LOOPS###  |####    |     1 |    73 |#|    16 |
    | 129 |####NESTED LOOPS### |####    |     1 |    64 |#|    15 |
    | 130 |#### NESTED LOOPS###|####    |     4 |   144 |#|    11 |
    |*131 |####  INDEX RANGE SCAN##  | IX1_HSD_SUMMARY_OUTPUT#  |    10 |   110 |#|     1 |
    |*132 |####  TABLE ACCESS BY INDEX ROWID     | CONTRACT_X_REGION##|     1 |    25 |#|     1 |
    |*133 |####   INDEX RANGE SCAN## | CONTRACT_X_REGION_PK#    |     1 |#|#|     1 |
    |*134 |#### TABLE ACCESS BY INDEX ROWID      | CONTRACT_INFORMATION#    |     1 |    28 |#|     1 |
    |*135 |####  INDEX RANGE SCAN##  | CONTRACT_INFORMATION_PK# |     1 |#|#|     1 |
    | 136 |####   SORT AGGREGATE##   |####    |     1 |    22 |#|#|
    | 137 |####    FIRST ROW###|####    |     1 |    22 |#|     1 |
    |*138 |####     INDEX RANGE SCAN (MIN/MAX)   | CONTRACT_INFORMATION_PK# |     1 |    22 |#|     1 |
    | 139 |####TABLE ACCESS BY INDEX ROWID#| STATES###    |     1 |     9 |#|     1 |
    |*140 |#### INDEX RANGE SCAN##   | STATES_INDX1##     |     1 |#|#|     1 |
    |*141 |###      TABLE ACCESS BY INDEX ROWID# | COUNTIES###  |     2 |    44 |#|     2 |
    |*142 |####INDEX RANGE SCAN##    | COUNTIES_INDX_4##  |    54 |#|#|     1 |
    | 143 |###    SORT AGGREGATE###  |####    |     1 |    25 |#|#|
    |*144 |###     TABLE ACCESS BY INDEX ROWID#  | CONTRACT_X_REGION##|     1 |    25 |#|     1 |
    |*145 |###      INDEX RANGE SCAN##     | IX1_CONTRACT_X_REGION#   |     1 |#|#|     1 |
    | 146 |###INTERSECTION#### |####    |#|#|#|#|
    | 147 |### SORT UNIQUE#### |####    |     1 |    97 |#|#|
    |*148 |###  FILTER####     |####    |#|#|#|#|
    | 149 |###   SORT GROUP BY###    |####    |     1 |    97 |#|  1822 |
    |*150 |###    HASH JOIN####|####    |     7 |   679 |#|  1773 |
    |*151 |###     TABLE ACCESS BY INDEX ROWID#  | CONTRACT_X_COUNTY##|  2357 | 98994 |#|   885 |
    |*152 |###      INDEX RANGE SCAN##     | CONTRACT_X_COUNTY_INDX_6#|   148K|#|#|   157 |
    | 153 |###     NESTED LOOPS OUTER##    |####    |  2338 |   125K|#|   886 |
    |*154 |###      TABLE ACCESS BY INDEX ROWID# | CONTRACT_X_COUNTY##|  2338 | 86506 |#|   885 |
    |*155 |####INDEX RANGE SCAN##    | CONTRACT_X_COUNTY_INDX_6#|   148K|#|#|   157 |
    |*156 |###      INDEX UNIQUE SCAN##    | CONTRACT_AREA_SUPP_INFO_PK     |     1 |    18 |#|     1 |
    | 157 |### SORT UNIQUE#### |####    |     1 |    97 |#|#|
    |*158 |###  FILTER####     |####    |#|#|#|#|
    | 159 |###   SORT GROUP BY###    |####    |     1 |    97 |#|   103 |
    | 160 |###    NESTED LOOPS###    |####    |     1 |    97 |#|    54 |
    | 161 |###     NESTED LOOPS OUTER##    |####    |    20 |  1100 |#|    34 |
    |*162 |###      INDEX RANGE SCAN##     | IX1_CONTRACT_X_COUNTY#   |    20 |   740 |#|    33 |
    |*163 |###      INDEX UNIQUE SCAN##    | CONTRACT_AREA_SUPP_INFO_PK     |     1 |    18 |#|     1 |
    |*164 |###     INDEX RANGE SCAN##      | CONTRACT_X_COUNTY_PK#    |     1 |    42 |#|     1 |
    | 165 |##  TABLE ACCESS BY INDEX ROWID##     | HSD_NCB_OUTPUT##   |     1 |    30 |#|     2 |
    | 166 |##   NESTED LOOPS####     |####    |     1 |    78 |#|  6158 |
    |*167 |##    HASH JOIN#####|####    |     1 |    48 |#|  6157 |
    | 168 |##     NESTED LOOPS####   |####    |     1 |    31 |#|  4004 |
    | 169 |##      VIEW#####   |####    |     2 |    32 |#|  4004 |
    | 170 |###SORT UNIQUE####  |####    |     2 |   152 |#|  4004 |
    | 171 |### UNION-ALL####   |####    |#|#|#|#|
    |*172 |###  HASH JOIN####  |####    |     1 |    88 |#|  2002 |
    |*173 |###   FILTER####    |####    |#|#|#|#|
    |*174 |###    HASH JOIN OUTER### |####    |     1 |    64 |#|  1938 |
    |*175 |###     TABLE ACCESS BY INDEX ROWID#  | CONTRACT_X_PARTIAL_ZIPCODE     |     1 |    40 |#|     1 |
    | 176 |###      NESTED LOOPS###  |####    |     1 |    56 |#|    12 |
    |*177 |####INDEX FULL SCAN##     | HSD_SUMMARY_OUTPUT_INDX3#|    10 |   160 |#|     2 |
    |*178 |####INDEX RANGE SCAN##    | CONTRACT_X_PAR_ZIP_APP_ID_IDX  |     1 |#|#|     1 |
    | 179 |###     VIEW####    | VW_HSD_PARTIAL_EXPANSION_ONLY  |     1 |     8 |#|  1925 |
    | 180 |###      INTERSECTION###  |####    |#|#|#|#|
    | 181 |####SORT UNIQUE###  |####    |     1 |    97 |#|#|
    |*182 |#### FILTER###      |####    |#|#|#|#|
    | 183 |####  SORT GROUP BY##     |####    |     1 |    97 |#|  1822 |
    |*184 |####   HASH JOIN### |####    |     7 |   679 |#|  1773 |
    |*185 |####    TABLE ACCESS BY INDEX ROWID   | CONTRACT_X_COUNTY##|  2357 | 98994 |#|   885 |
    |*186 |####     INDEX RANGE SCAN#      | CONTRACT_X_COUNTY_INDX_6#|   148K|#|#|   157 |
    | 187 |####    NESTED LOOPS OUTER#     |####    |  2338 |   125K|#|   886 |
    |*188 |####     TABLE ACCESS BY INDEX ROWID  | CONTRACT_X_COUNTY##|  2338 | 86506 |#|   885 |
    |*189 |####      INDEX RANGE SCAN#     | CONTRACT_X_COUNTY_INDX_6#|   148K|#|#|   157 |
    |*190 |####     INDEX UNIQUE SCAN#     | CONTRACT_AREA_SUPP_INFO_PK     |     1 |    18 |#|     1 |
    | 191 |####SORT UNIQUE###  |####    |     1 |    97 |#|#|
    |*192 |#### FILTER###      |####    |#|#|#|#|
    | 193 |####  SORT GROUP BY##     |####    |     1 |    97 |#|   103 |
    | 194 |####   NESTED LOOPS##     |####    |     1 |    97 |#|    54 |
    | 195 |####    NESTED LOOPS OUTER#     |####    |    20 |  1100 |#|    34 |
    |*196 |####     INDEX RANGE SCAN#      | IX1_CONTRACT_X_COUNTY#   |    20 |   740 |#|    33 |
    |*197 |####     INDEX UNIQUE SCAN#     | CONTRACT_AREA_SUPP_INFO_PK     |     1 |    18 |#|     1 |
    |*198 |####    INDEX RANGE SCAN##| CONTRACT_X_COUNTY_PK#    |     1 |    42 |#|     1 |
    | 199 |###   VIEW####      | VW_SQ_7###   |    30 |   720 |#|    64 |
    |*200 |###    FILTER####   |####    |#|#|#|#|
    | 201 |###     SORT GROUP BY###  |####    |    30 |  1530 |#|    64 |
    |*202 |###      INDEX FAST FULL SCAN## | CONTRACT_X_PARTIAL_ZIPCODE_PK  |   588 | 29988 |#|    37 |
    |*203 |###  FILTER####     |####    |#|#|#|#|
    | 204 |###   NESTED LOOPS OUTER##      |####    |     1 |    64 |#|  1952 |
    | 205 |###    VIEW####     |####    |     1 |    38 |#|  1951 |
    | 206 |###     SORT UNIQUE###    |####    |     1 |    50 |#|  1951 |
    | 207 |###      NESTED LOOPS###  |####    |     1 |    50 |#|  1927 |
    | 208 |####NESTED LOOPS### |####    |     1 |    34 |#|  1926 |
    | 209 |#### VIEW#### | VW_HSD_PARTIAL_EXPANSION_ONLY  |     1 |    14 |#|  1925 |
    | 210 |####  INTERSECTION##      |####    |#|#|#|#|
    | 211 |####   SORT UNIQUE##      |####    |     1 |    97 |#|#|
    |*212 |####    FILTER###   |####    |#|#|#|#|
    | 213 |####     SORT GROUP BY##  |####    |     1 |    97 |#|  1822 |
    |*214 |####      HASH JOIN##     |####    |     7 |   679 |#|  1773 |
    |*215 | D####     TABLE ACCESS BY INDEX ROWI | CONTRACT_X_COUNTY##|  2357 | 98994 |#|   885 |
    |*216 |##### INDEX RANGE SCAN#   | CONTRACT_X_COUNTY_INDX_6#|   148K|#|#|   157 |
    | 217 |#####NESTED LOOPS OUTER#  |####    |  2338 |   125K|#|   886 |
    |*218 | ID####     TABLE ACCESS BY INDEX ROW | CONTRACT_X_COUNTY##|  2338 | 86506 |#|   885 |
    |*219 |#####  INDEX RANGE SCAN#  | CONTRACT_X_COUNTY_INDX_6#|   148K|#|#|   157 |
    |*220 |##### INDEX UNIQUE SCAN#  | CONTRACT_AREA_SUPP_INFO_PK     |     1 |    18 |#|     1 |
    | 221 |####   SORT UNIQUE##      |####    |     1 |    97 |#|#|
    |*222 |####    FILTER###   |####    |#|#|#|#|
    | 223 |####     SORT GROUP BY##  |####    |     1 |    97 |#|   103 |
    | 224 |####      NESTED LOOPS##  |####    |     1 |    97 |#|    54 |
    | 225 |#####NESTED LOOPS OUTER#  |####    |    20 |  1100 |#|    34 |
    |*226 |##### INDEX RANGE SCAN#   | IX1_CONTRACT_X_COUNTY#   |    20 |   740 |#|    33 |
    |*227 |##### INDEX UNIQUE SCAN#  | CONTRACT_AREA_SUPP_INFO_PK     |     1 |    18 |#|     1 |
    |*228 |#####INDEX RANGE SCAN#    | CONTRACT_X_COUNTY_PK#    |     1 |    42 |#|     1 |
    | 229 |#### TABLE ACCESS BY INDEX ROWID      | HSD_SUMMARY_OUTPUT#      |     1 |    20 |#|     1 |
    |*230 |####  INDEX RANGE SCAN##  | HSD_SUMMARY_OUTPUT_INDX4#|     1 |#|#|     1 |
    |*231 |####INDEX RANGE SCAN##    | PK_HSD_NCB_OUTPUT1#      |     6 |    96 |#|     1 |
    |*232 |###    TABLE ACCESS BY INDEX ROWID#   | CONTRACT_X_PARTIAL_ZIPCODE     |     1 |    26 |#|     1 |
    |*233 |###     INDEX RANGE SCAN##      | IX5_CONTRACT_X_PARTIAL_ZIPCODE |     1 |#|#|     1 |
    |*234 |##      INDEX RANGE SCAN###     | IX1_HSD_SUMMARY_OUTPUT#  |     1 |    15 |#|     1 |
    | 235 |##     VIEW#####    |####    |     5 |    85 |#|  2152 |
    | 236 |##      SORT UNIQUE####   |####    |     5 |   262 |#|  2152 |
    | 237 |###UNION-ALL####    |####    |#|#|#|#|
    | 238 |### VIEW##### |####    |     4 |    68 |#|   203 |
    | 239 |###  SORT UNIQUE####|####    |     4 |   398 |#|   203 |
    | 240 |###   UNION-ALL#### |####    |#|#|#|#|
    |*241 |###    FILTER####   |####    |#|#|#|#|
    | 242 |###     SORT GROUP BY###  |####    |     1 |   107 |#|    62 |
    | 243 |###      NESTED LOOPS###  |####    |     1 |   107 |#|    13 |
    | 244 |####NESTED LOOPS### |####    |     1 |    65 |#|    12 |
    |*245 |#### INDEX FULL SCAN##    | HSD_SUMMARY_OUTPUT_INDX3#|    10 |   230 |#|     2 |
    |*246 |#### INDEX RANGE SCAN##   | CONTRACT_X_COUNTY_APP_ID_IDX   |     1 |    42 |#|     1 |
    |*247 |####INDEX RANGE SCAN##    | CONTRACT_X_COUNTY_PK#    |     1 |    42 |#|     1 |
    |*248 |###    FILTER####   |####    |#|#|#|#|
    | 249 |###     SORT GROUP BY###  |####    |     1 |   104 |#|    62 |
    | 250 |###      NESTED LOOPS###  |####    |     1 |   104 |#|    13 |
    | 251 |####NESTED LOOPS### |####    |     1 |    62 |#|    12 |
    |*252 |#### INDEX FULL SCAN##    | HSD_SUMMARY_OUTPUT_INDX3#|    10 |   230 |#|     2 |
    |*253 |#### TABLE ACCESS BY INDEX ROWID      | CONTRACT_X_PARTIAL_ZIPCODE     |     1 |    39 |#|     1 |
    |*254 |####  INDEX RANGE SCAN##  | CONTRACT_X_PAR_ZIP_APP_ID_IDX  |     1 |#|#|     1 |
    |*255 |####INDEX RANGE SCAN##    | CONTRACT_X_PARTIAL_ZIPCODE_PK  |     1 |    42 |#|     1 |
    |*256 |###    FILTER####   |####    |#|#|#|#|
    |*257 |###     FILTER####  |####    |#|#|#|#|
    | 258 |###      NESTED LOOPS###  |####    |     1 |    92 |#|     8 |
    | 259 |####NESTED LOOPS### |####    |     1 |    70 |#|     6 |
    | 260 |#### NESTED LOOPS###|####    |     1 |    61 |#|     5 |
    | 261 |####  NESTED LOOPS##      |####    |     1 |    50 |#|     4 |
    |*262 |####   TABLE ACCESS BY INDEX ROWID    | CONTRACT_INFORMATION#    |     1 |    25 |#|     3 |
    |*263 |####    INDEX RANGE SCAN##| IX2_CONTRACT_INFORMATION#|     1 |#|#|     2 |
    | 264 |####     SORT AGGREGATE## |####    |     1 |    22 |#|#|
    | 265 |####      FIRST ROW##     |####    |     1 |    22 |#|     1 |
    |*266 |#####INDEX RANGE SCAN (MIN/MAX) | CONTRACT_INFORMATION_PK# |     1 |    22 |#|     1 |
    |*267 |####   TABLE ACCESS BY INDEX ROWID    | CONTRACT_X_REGION##|     1 |    25 |#|     1 |
    |*268 |####    INDEX RANGE SCAN##| CONTRACT_X_REGION_PK#    |     1 |#|#|     1 |
    |*269 |####  INDEX RANGE SCAN##  | HSD_SUMMARY_OUTPUT_INDX4#|     1 |    11 |#|     1 |
    | 270 |#### TABLE ACCESS BY INDEX ROWID      | STATES###    |     1 |     9 |#|     1 |
    |*271 |####  INDEX RANGE SCAN##  | STATES_INDX2##     |     2 |#|#|     1 |
    |*272 |####TABLE ACCESS BY INDEX ROWID#| COUNTIES###  |     2 |    44 |#|     2 |
    |*273 |#### INDEX RANGE SCAN##   | COUNTIES_INDX_4##  |    54 |#|#|     1 |
    | 274 |###     SORT AGGREGATE### |####    |     1 |    25 |#|#|
    |*275 |###      TABLE ACCESS BY INDEX ROWID# | CONTRACT_X_REGION##|     1 |    25 |#|     1 |
    |*276 |####INDEX RANGE SCAN##    | IX1_CONTRACT_X_REGION#   |     1 |#|#|     1 |
    |*277 |###    FILTER####   |####    |#|#|#|#|
    |*278 |###     FILTER####  |####    |#|#|#|#|
    | 279 |###      NESTED LOOPS###  |####    |     1 |    95 |#|    18 |
    | 280 |####NESTED LOOPS### |####    |     1 |    73 |#|    16 |
    | 281 |#### NESTED LOOPS###|####    |     1 |    64 |#|    15 |
    | 282 |####  NESTED LOOPS##      |####    |     4 |   144 |#|    11 |
    |*283 |####   INDEX RANGE SCAN## | IX1_HSD_SUMMARY_OUTPUT#  |    10 |   110 |#|     1 |
    |*284 |####   TABLE ACCESS BY INDEX ROWID    | CONTRACT_X_REGION##|     1 |    25 |#|     1 |
    |*285 |####    INDEX RANGE SCAN##| CONTRACT_X_REGION_PK#    |     1 |#|#|     1 |
    |*286 |####  TABLE ACCESS BY INDEX ROWID     | CONTRACT_INFORMATION#    |     1 |    28 |#|     1 |
    |*287 |####   INDEX RANGE SCAN## | CONTRACT_INFORMATION_PK# |     1 |#|#|     1 |
    | 288 |####    SORT AGGREGATE##  |####    |     1 |    22 |#|#|
    | 289 |####     FIRST ROW##      |####    |     1 |    22 |#|     1 |
    |*290 |####      INDEX RANGE SCAN (MIN/MAX)  | CONTRACT_INFORMATION_PK# |     1 |    22 |#|     1 |
    | 291 |#### TABLE ACCESS BY INDEX ROWID      | STATES###    |     1 |     9 |#|     1 |
    |*292 |####  INDEX RANGE SCAN##  | STATES_INDX1##     |     1 |#|#|     1 |
    |*293 |####TABLE ACCESS BY INDEX ROWID#| COUNTIES###  |     2 |    44 |#|     2 |
    |*294 |#### INDEX RANGE SCAN##   | COUNTIES_INDX_4##  |    54 |#|#|     1 |
    | 295 |###     SORT AGGREGATE### |####    |     1 |    25 |#|#|
    |*296 |###      TABLE ACCESS BY INDEX ROWID# | CONTRACT_X_REGION##|     1 |    25 |#|     1 |
    |*297 |####INDEX RANGE SCAN##    | IX1_CONTRACT_X_REGION#   |     1 |#|#|     1 |
    | 298 |### INTERSECTION####|####    |#|#|#|#|
    | 299 |###  SORT UNIQUE####|####    |     1 |    97 |#|#|
    |*300 |###   FILTER####    |####    |#|#|#|#|
    | 301 |###    SORT GROUP BY###   |####    |     1 |    97 |#|  1822 |
    |*302 |###     HASH JOIN###      |####    |     7 |   679 |#|  1773 |
    |*303 |###      TABLE ACCESS BY INDEX ROWID# | CONTRACT_X_COUNTY##|  2357 | 98994 |#|   885 |
    |*304 |####INDEX RANGE SCAN##    | CONTRACT_X_COUNTY_INDX_6#|   148K|#|#|   157 |
    | 305 |###      NESTED LOOPS OUTER##   |####    |  2338 |   125K|#|   886 |
    |*306 |####TABLE ACCESS BY INDEX ROWID#| CONTRACT_X_COUNTY##|  2338 | 86506 |#|   885 |
    |*307 |#### INDEX RANGE SCAN##   | CONTRACT_X_COUNTY_INDX_6#|   148K|#|#|   157 |
    |*308 |####INDEX UNIQUE SCAN##   | CONTRACT_AREA_SUPP_INFO_PK     |     1 |    18 |#|     1 |
    | 309 |###  SORT UNIQUE####|####    |     1 |    97 |#|#|
    |*310 |###   FILTER####    |####    |#|#|#|#|
    | 311 |###    SORT GROUP BY###   |####    |     1 |    97 |#|   103 |
    | 312 |###     NESTED LOOPS###   |####    |     1 |    97 |#|    54 |
    | 313 |###      NESTED LOOPS OUTER##   |####    |    20 |  1100 |#|    34 |
    |*314 |####INDEX RANGE SCAN##    | IX1_CONTRACT_X_COUNTY#   |    20 |   740 |#|    33 |
    |*315 |####INDEX UNIQUE SCAN##   | CONTRACT_AREA_SUPP_INFO_PK     |     1 |    18 |#|     1 |
    |*316 |###      INDEX RANGE SCAN##     | CONTRACT_X_COUNTY_PK#    |     1 |    42 |#|     1 |
    |*317 |##    INDEX RANGE SCAN####| PK_HSD_NCB_OUTPUT1#      |     1 |#|#|     1 |
    | 318 |#VIEW#######  |####    |  1155 | 56595 |#|  3738 |
    |*319 |# HASH JOIN######   |####    |  1155 | 56595 |    10M|  3738 |
    |*320 |#  TABLE ACCESS FULL##### | HSD_NCB_OUTPUT##   |   304K|  7443K|#|  1071 |
    |*321 |#  TABLE ACCESS FULL##### | HSD_CALC_OUTPUT##  |   340K|  7986K|#|  2308 |
    | 322 |      VIEW PUSHED PREDICATE#####|####    |     1 |    49 |#|     2 |
    | 323 |#NESTED LOOPS###### |####    |     1 |    49 |#|     3 |
    | 324 |# TABLE ACCESS BY INDEX ROWID###      | HSD_NCB_OUTPUT##   |     1 |    25 |#|     2 |
    |*325 |#  INDEX UNIQUE SCAN##### | PK_HSD_NCB_OUTPUT1#      |     1 |#|#|     1 |
    | 326 |# TABLE ACCESS BY INDEX ROWID###      | HSD_CALC_OUTPUT##  |     1 |    24 |#|     1 |
    |*327 |#  INDEX UNIQUE SCAN##### | PK_HSD_ACC_CALC_OUTPUT1# |     1 |#|#|     1 |
    ---------------------------------------------------------------------------------------------------------------------------------------

  • Problems with partitions after hard reset

    Hi hope some can help here, I installed Maverick on my imac and everything seemed fine, I went to work and came home to find a black screen with nothing but the mouse cursor, however the computer wouldnt respond in any way so had to do a hard reset when the computer restarted I would get the Aplle logo and the spinning wheel then the computer would restart it kept doing this over and over.
    I restared the computer went into DU tried to repair disk and kept getting errors, my drive is 3TB i have a 1TB primary Partition and a second of 2TB I tried to erase and reformat the primary partition but got an error half way through now both partitons are greyed out with no way or deleting or doing anything with them I have also noticed I no longer have the hard drive make and model in the list just Mackintoh HD and my second partition, to make matters worse my second partition is now unmounted and and when I try to mount it says it needs to be repaired but wont repair, I really need totry and get the data from the second partiton but im struggling, when I tried to reinstall os x it cant see a drive to install to nothing shows up, I even booted using diskwarrior and even it couldnt see the drive, I know this drive is ok this is a software issue the partition table seems to be corrupt or something help!!
    Its worth mentioning I had Parallels and Windows 7 on the primary partiton could the windows partiton have caused an issue when I tried to erase and reformat the partition?
    Message was edited by: seanybdj

    The drive has failed.

Maybe you are looking for

  • TS1368 It says installing but its not doing ie on my Ipad

    THere were a few alerts to upgrade a few Apps like Twitter, games etc so I clicked on to update. I then synced with my computer to do it. It keeps saying Installing from yesterday but nothing is happening. Also I cannot delete those Apps as its sayin

  • Put a swf into an existing swf

    i want to play a swf file inside my flash website, the swf needs to be an external file, not inside the movie itself, how can i do this?

  • Report like MCEC work on actual data(MRP)

    Dear All, Is there any report like mcec that work on operative planning(MRP), bt not work on simulative planning. I want the same data(purchase plan) after executing MRP. Thanks

  • WEB AS JAVA System In SOLMAN

    Hi Experts,               Normally we add the abap system in SOLMAN where we can monitor.               Is it possible to add a web AS java in the SOLMAN where we can               monitor centrally. If so can you please suggest me some documents    

  • Unable to recieve content in mail attachment

    Hi all, I am unable to recieve content in mail attachment. I am using java mapping to define mime boundary. Please suggest any inputs. Regards, Saipriya