Question about UNIQUE INDEX

Given a table with 2 columns. They are not setup as UNIQUE.
TABLE_A (
column1 NUMBER NOT NULL,
column2 NUMBER
Then, a UNIQUE INDEX is created for both of the columns
CREATE UNIQUE INDEX XX.TABLEA_U ON TABLE_A
(column1, column2)
My question is does the above UNIQUE INDEX somehow act as a UNIQUE Constraint to "column1"?
Thanks in Advance

It acts as a unique constraint on both the columns.If duplicate row is inserted you will get error like
05:40:30 sql>create unique index u_a on a (column1,column2);
05:41:07 sql>insert into a values (1,2);
1 row created.
Elapsed: 00:00:00.00
05:41:12 sql>insert into a values (1,2);
insert into a values (1,2)
ERROR at line 1:
ORA-00001: unique constraint (SYSADM.U_A) violated
05:41:15 sql>insert into a values (1,3);
1 row created.
Elapsed: 00:00:00.00Anand
Edited by: Anand... on Nov 5, 2009 5:41 AM

Similar Messages

  • Question about unique ViewAttributes

    Hello Everyone,
    Is there a way to have the BC4J framework fire a ValidationException when the setAttribute method is called and a unique constraint is violated ? Currently the framework will throw an SQLException when the application attempts to commit a Transaction under such conditions.
    I would like to be able to inform the user about such a condition before they attempt to commit their transaction. I have tried the "IsUnique" setting for the ViewAttribute but have not had any luck. Does anyone know how to acheive this ? I appreciate any insight anyone can provide!
    Thank you,
    Jim
    null

    It acts as a unique constraint on both the columns.If duplicate row is inserted you will get error like
    05:40:30 sql>create unique index u_a on a (column1,column2);
    05:41:07 sql>insert into a values (1,2);
    1 row created.
    Elapsed: 00:00:00.00
    05:41:12 sql>insert into a values (1,2);
    insert into a values (1,2)
    ERROR at line 1:
    ORA-00001: unique constraint (SYSADM.U_A) violated
    05:41:15 sql>insert into a values (1,3);
    1 row created.
    Elapsed: 00:00:00.00Anand
    Edited by: Anand... on Nov 5, 2009 5:41 AM

  • Question about composite index and index skip scan

    Hi,
    I have a confusion.
    I have read Burleson's post on composite index column ordering (http://www.dba-oracle.com/t_composite_index_multi_column_ordering.htm) where he writes that
    "......for composite indexes the most restrictive column value(the column with the highest unique values) should be put first to trim down the result set..."
    But 10g performance tuning book tells this about INDEX SKIP SCAN ::
    "... Index Skip scanning lets a composite index be split logically into smaller subindexes. In skip
    scanning, the initial column of the composite index is not specified in the query. In other words, it is skipped.
    The number of logical subindexes is determined by the number of distinct values in the initial column.
    Skip scanning is advantageous if there are few distinct values in the leading column of the composite index and many distinct values in the non-leading key of the index......."
    So if we design Composite indexes acc. to what Burleson said then how can we take advantage of index skip scanning. These two staements oppose each other,don't they ?
    Can anybody explain this ?

    Dear,
    For the moment forget the distinct values and the compressibility. I've tried to reproduce your case here below (using jonathan lewis table script)
    create table t1
    as
    with generator as (
        select    --+ materialize
            rownum id
        from dual
        connect by
            rownum <= 10000
    select
        rownum              c1,
        mod(rownum,1000)    c2,
        mod(rownum,5000)    c3,
        mod(rownum,10000)   c4,
        lpad(rownum,10,'0') c5,
        rpad('x',5)         c6
    from
        generator    v1,
        generator    v2
    where
        rownum <= 1000
    alter table t1 add constraint t1_pk primary key (c3,c4,c5,C6);
    create index idx_1 on t1 (c1,c2);
    begin
         dbms_stats.gather_table_stats(
              ownname           => user,
              tabname           =>'T1',
              estimate_percent => 100,
              method_opt       => 'for all columns size 1'
    end;
    /and here are what I got with your two selects
    mho.sql>> SELECT c1,c2
      2  FROM t1
      3  WHERE c2 = 3;
            C1         C2
             3          3
    Elapsed: 00:00:00.00
    mho.sql>> start dispcursor
    PLAN_TABLE_OUTPUT
    SQL_ID  4dbgq3m2utd9f, child number 0
    SELECT c1,c2 FROM t1 WHERE c2 = 3
    Plan hash value: 3723378319
    | Id  | Operation            | Name  | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    |*  1 |  INDEX FAST FULL SCAN| IDX_1 |      1 |      1 |      1 |00:00:00.01 |       7 |
    Predicate Information (identified by operation id):
       1 - filter("C2"=3)
    17 rows selected.
    Elapsed: 00:00:00.34
    mho.sql>> SELECT c3,c4,c5,c6
      2  FROM t1
      3  WHERE c4 = 3
      4  AND c5 = '0000000003'
      5  AND c6 = 'x    ';
            C3         C4 C5         C6
             3          3 0000000003 x
    Elapsed: 00:00:00.00
    mho.sql>> @dispcursor
    PLAN_TABLE_OUTPUT
    SQL_ID  fv62c9uqtktw9, child number 0
    SELECT c3,c4,c5,c6 FROM t1 WHERE c4 = 3 AND c5 = '0000000003' AND c6 = 'x    '
    Plan hash value: 2969533764
    | Id  | Operation            | Name  | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    |*  1 |  INDEX FAST FULL SCAN| T1_PK |      1 |      1 |      1 |00:00:00.01 |       9 |
    Predicate Information (identified by operation id):
       1 - filter(("C4"=3 AND "C5"='0000000003' AND "C6"='x    '))
    17 rows selected.I didn't succeed to reproduce your index skip scan situation.
    Best Regards
    Mohamed Houri

  • Question about filtered index

    I am looking over database for the SQL objects having SET QUOTED_IDENTIFIER OFF and SET ANSI_NULLS OFF
    For filtered index both needs to be ON so what about the objects that dont have quoted_identifier and ansi_nulls code line?
    do i need to add SET QUOTED_IDENTIFIER ON and SET ANSI_NULLS ON for those objects as well?

    Following article solved my question
    http://blogs.msdn.com/b/sqlprogrammability/archive/2009/06/29/interesting-issue-with-filtered-indexes.aspx
    I tried creating proc without quoted_identifier and ansi_nulls code line and proc still executes

  • Question about Global index and Table Partitions

    I have created a global index for a partitioned table now in the future the partitions will be dropped in the table. Do I need to do anything to the global index? Does it need to be rebuilt or would it be ok if partitions get dropped in the table?

    >
    I have created a global index for a partitioned table now in the future the partitions will be dropped in the table. Do I need to do anything to the global index? Does it need to be rebuilt or would it be ok if partitions get dropped in the table?
    >
    You can use the UPDATE INDEXES clause. That allows users to keep using the table and Oracle will keep the global indexes updated.
    Otherwise, as already stated all global indexes will be marked UNUSABLE.
    See 'Dropping Partitions' in the VLDB and Partitioning Guide
    http://docs.oracle.com/cd/E11882_01/server.112/e25523/part_admin002.htm#i1007479
    >
    If local indexes are defined for the table, then this statement also drops the matching partition or subpartitions from the local index. All global indexes, or all partitions of partitioned global indexes, are marked UNUSABLE unless either of the following is true:
    You specify UPDATE INDEXES (Cannot be specified for index-organized tables. Use UPDATE GLOBAL INDEXES instead.)
    The partition being dropped or its subpartitions are empty

  • Question about the index and homepages

    Hello all,
    I am new to dreamweaver and I have only had my website for a couple of months now.
    On my site, I have a "Home Page" button that visitors can click to return to the home URL.
    My home URL is: www.djidblends.com
    When users click on the "Home Page" button, they are taken to the URL: www.djidblends.com/index.html
    In the past, whenever I wanted to update my regular home page, I just simply updated the index.html file in dreamweaver... and it worked for both of the URLs listed above.
    However, I recently attempted to update the home page once again, and it did NOT work for both URLs.
    For example, when I visit www.djidblends.com, my page is NOT updated.
    When I click on the "Home Page" button, my page IS updated.
    I have looked around and some people have had the same problem as me, but I haven't found a legit fix for this problem.
    If anyone knows how I can fix this, I would greatly appreciate your help.
    Thanks,
    Bye.

    On my site, I have a "Home Page" button that visitors can click to return to the home URL.
    My home URL is: www.djidblends.com
    When you go to http://www.djidblends.com, the server tries to open pages that are named index.htm, index.html, index.php amongst others. In this case index.html will be opened despite it not showing as such in the address bar.
    When users click on the "Home Page" button, they are taken to the URL: www.djidblends.com/index.html
    That is correct because the Home Page button links to index.html. The reason why it shows in the address bar as http://www.djidblends.com/index.html is because the link is within the www.djidblends.com site. If you click the Contact Information button, the address bar will correspond to the contact.html link.
    In the past, whenever I wanted to update my regular home page, I just simply updated the index.html file in dreamweaver... and it worked for both of the URLs listed above.
    That is correct, you are uploading the page that is linked to the menu.
    However, I recently attempted to update the home page once again, and it did NOT work for both URLs.
    For example, when I visit www.djidblends.com, my page is NOT updated.
    When I click on the "Home Page" button, my page IS updated.
    That is because the browser has a cached copy of your site and it will load the cached copy to save time. When you click the Home Button it may, but not always, refresh the page bypassing the cached version. IE may not respond immediately because it tends to hang onto the cached version of the page much longer.
    I have looked around and some people have had the same problem as me, but I haven't found a legit fix for this problem.
    If anyone knows how I can fix this, I would greatly appreciate your help.
    The problem occurs when someone has paid a visit to your site before the updated page has been uploaded. There are ways to overcome this. For more info have a look here http://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache
    Gramps

  • Question about Unique Table Columns - How to Handle Alerts

    I have a table with a unique column, and I want to provide an error alert when a user tries to insert a record in which there is another record that already has the same value for that column.
    I tried just relying on the table constraint in the DB, but I just get a "cannot insert record" message on the form run-time.
    I put a query in the PRE-INSERT trigger to query and see if that value exists in another record and display the alert there, but my concern is that a record could be inserted by another user after my check query runs. In that case, I will still just get the "cannot insert record" message.
    What is a good way that I can give an error alert AND assure that another record is not being inserted in the mean time?
    Thanks,
    Kurz

    There is NO way you can absolutely trap all situations by checking in the when-validate triggers.
    Your user could even try to insert the same duplicate value in two rows at the same time.
    Or another user could commit at the same time as the first.
    The ONLY way to handle those errors is to trap for the error in the On-Error trigger, which fires
    when Forms returns the FRM-40508 or FRM-40509 code. Here is the standard code we have settled on here:
    -- On-Error form-level trigger                                       --*
    DECLARE
      Err_Code NUMBER(5)     := ERROR_CODE;
      Msg      VARCHAR2(150)
              := SUBSTR('   '||ERROR_TYPE||'-'||TO_CHAR(ERR_Code)||': '
                                         ||ERROR_TEXT,1,150);
      DBMS_TXT VARCHAR2(200);
    BEGIN
      -- 40508=Unable to insert rec.  40509=Unable to update rec.
      IF Err_Code IN(40508,40509) THEN
        DBMS_TXT := SUBSTR(DBMS_ERROR_TEXT,1,200);
        IF  DBMS_TXT like '%unique constraint%'
        AND DBMS_TXT like '%I_PK_ASGTABLE%'  THEN
          U73_ERR_TIMER('ASG.RESIDENCE_CODE');
          Message('   5011  DUPLICATE RESIDENCE CODE FOUND');
          Raise Form_trigger_failure;
        END IF;
      END IF;
      -- This handles all other on-error messages:
      Message(Msg);
      Raise Form_trigger_failure;
    END;U73_ERR_TIMER just assures that focus gets placed on the correct item, and sets its color red.

  • Question about "Spatial Index Advisor"

    I'm now using "Oracle8i Enterprise Edition 8.1.6" and "Oracle8i Enterprise Manager 2.1" for Windows NT/2000. I tried to use the extended administration tool of the Manager "Spatial Index Advisor" to access my spatial data. I can see the layers in the "Add layer" Dialog. But when I want to add a layer, it popup a failed message box said "Server object could not be created:Server object could not be initialized:Not be supported charaterset:oracle-characterset-852". Why? And how can I solve the problem?

    Hi Dinghy,
    The Oracle 8.1.6 sdo advisor is only implemented for the US7ASCII character set.
    The Oracle 8.1.7 release of the advisor does have NLS support.
    Hope this helps. Thanks.
    Dan
    null

  • Three questions about the creation of secondary indexes in ODS design mode

    1. When we right click the Indexes folder in ODS design to select Create to create the Index folder 010, a small window pops up with a check box called "Unique", do we have to check this checkbox to create folder 010?
    2. If we would like to include 3 InfoObjects into the secondary indexes, then how many folders we need to create? Need to create 3 folders like 010, 020, and 030 and place the 3 InfoObj. into the 3 folder respectively or create only one folder 010 and place all the 3 InfoObj. into this one folder 010?
    3. In SAP documentation titled "BW Performance Tuning" about the Indices, it says "If the (uncompressed) F fact table is small, it is usually faster to drop the secondary (bitmap) indices before the load and build them up after the load"
    Someone here says secondary index is only for ODS other than for cubes, but from the above statement, F fact table is related to cubes, then how to explain it? Also the above statement is talking above the variant in process chain that when you bring in a variant to load data to cube, then the drop index and generate index variants will be automatically created, does it refer to this? And what's bitmap index?
    Thanks in advance and we will continue to give you reward points!

    Hi Kevin,
    Cube has Secondary index's. The index's that we find in the Manage of the Cube are the Secondary Index's. Please check the following link for more information.
    http://help.sap.com/saphelp_erp2004/helpdata/en/80/1a6473e07211d2acb80000e829fbfe/frameset.htm
    Also, to know about Unique indexes, use the following link
    http://help.sap.com/saphelp_erp2004/helpdata/en/9b/c743f5b40711d194f900a0c929b3c3/frameset.htm
    "The indexes displayed are the secondary indexes of the F and E fact tables for the InfoCube. The primary indexes and those defined by the user are not displayed. " (SAP help).
    This should answer your questions.
    Regards,
    Praveen.

  • Question about the partition index

    Hi, all, I have some questions about partitioned index.
    And I get from oracle documents that oracle's partition index can be clarified as local partition index and global partition index.
    And local partition index can be clarified as prefix local partition index and non-prefix local partition index. And I also the word "global prefix partition index".
    But, I can not get what the exact meaning after I consulted many documents and notes from website.
    Can anyone give me one example to cover these topic?
    You help is very thankful!
    Thanks and best regards!

    Hi,
    Local index search by partition.
    Local Indexes: A local index is an index on a partitioned table which is partitioned in the exact same manner as the underlying partitioned table. Each partition of a local index corresponds to one and only one partition of the underlying table.
    Global Partitioned Indexes: A global partitioned index is an index on a partitioned or non-partitioned table which is partitioned using a different partitioning-key from the table. Global-partitioned indexes can only be partitioned using range partitioning. For example, a table could be range-partitioned by month and have twelve partitions, while an index on that table could be range-partitioned using a different partitioning key and have a different number of partitions.
    Global Non-Partitioned Indexes: A global non-partitioned index is essentially identical to an index on a non-partitioned table. The index structure is not partitioned.
    Maybe this links help you:
    http://www.oracle.com/technology/products/oracle9i/datasheets/partitioning.html
    http://asktom.oracle.com/pls/ask/f?p=4950:8:12026637104196321871::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:678824574412
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1612281449571
    Cheers

  • Questions about Indexing and Using an Indexing POA

    Although I have only about 50 users, at least 15 of them have in excess of 100,000 messages in their accounts and the POA (version 7.0.2) is regularly slowing to a crawl. (I just know that plans for revolution are fomenting!) I have embarked on a campaign to reduce these accounts by archiving everything off to get mail accounts down to 3000 or fewer pieces. I have achieved user buy-in, but have worked on only a few users so far.
    In another closely related thread, it was suggested to me that the PO speed issues relate to broken indexes. And I suspect that given so many messages, the indexes were never getting fully rebuilt with the default QF POA settings. I am trying to fix that situation in addition to reducing mail account sizes. So, I have set up a second POA on another server and dedicated it to the indexing task. The /qfinterval is set for 1 hour, other /qf switches at default. The POA-QF does no mail delivery, but it does do nightly user upkeep.
    The POA-QF seems to be steadily working away and making progress at reducing the number of unindexed messages. However, I have questions about what I am seeing and what more I can do:
    1. Is the progress I am seeing real progress? For example I have a user with over 100,000 messages to be indexed and every time I check the logs, the count drops by about 500 messages per hourly QF cycle. I assume that if I just let it keep running, it will eventually get caught up and fixed. Not only with this user, but with all the others as well. Will my patience (and theirs) be rewarded? Are there any gotchas I need to prepare for?
    2. One user has recently had virtually all of her messages successfully moved to archive. I can see them in the Archive, and do not see them in the online account. However, now over a week later, QF still shows >130,000 items still left to index for that user. The POA-QF is making slow, steady progress reducing that number, but why is this user's QF count still so high? Does it just need more time, or is there something amiss for this user?
    3. I may want to rebuild indexes for single users from scratch. I have seen the TID 3105742 which tells how to do this: Essentially you turn off mail delivery functions, and make some other switch changes to dedicate the POA to indexing for just a single user, and then you let the POA rebuild the indexes. The implication of that scenario is that the POA is now enjoying exclusive access to the user's databases.
    If I want to use my secondary POA-QF to rebuild a user's index from scratch, does the main POA have to be offline and the user out of GWise? That is, Does the QF process require exclusive access in order to rebuild indexes from scratch?
    Thanks for any thoughts or suggestions.
    Peter Smick

    pgsmick wrote:
    > 1. Is the progress I am seeing real progress? For example I have a user with
    > over 100,000 messages to be indexed and every time I check the logs, the count
    > drops by about 500 messages per hourly QF cycle. I assume that if I just let
    > it keep running, it will eventually get caught up and fixed. Not only with
    > this user, but with all the others as well. Will my patience (and theirs) be
    > rewarded? Are there any gotchas I need to prepare for?
    Set this switch for this indexing POA - /qflevel=999 - this will index
    everything in one run. It will take a long time, but with no qflevel switch you
    are indeed only indexing 500 messages at a time, and if the user has that much
    mail, it might never really catch up.
    >
    > 2. One user has recently had virtually all of her messages successfully moved
    > to archive. I can see them in the Archive, and do not see them in the online
    > account. However, now over a week later, QF still shows >130,000 items still
    > left to index for that user. The POA-QF is making slow, steady progress
    > reducing that number, but why is this user's QF count still so high? Does it
    > just need more time, or is there something amiss for this user?
    >
    This is odd, because really the index count should drop to nothing, but with the
    above switch this might get resolved as well.
    > 3. I may want to rebuild indexes for single users from scratch. I have seen
    > the TID 3105742 which tells how to do this: Essentially you turn off mail
    > delivery functions, and make some other switch changes to dedicate the POA to
    > indexing for just a single user, and then you let the POA rebuild the indexes.
    > The implication of that scenario is that the POA is now enjoying exclusive
    > access to the user's databases.
    Not really - the POA is not enjoying exclusive access to the user's database,
    the indexer is just avoiding an attempt to index anything else.
    > If I want to use my secondary POA-QF to rebuild a user's index from scratch,
    > does the main POA have to be offline and the user out of GWise? That is, Does
    > the QF process require exclusive access in order to rebuild indexes from
    > scratch?
    No - QF never requires exclusive access. That said, you may find that an
    extremely vigorous QF can cause slowdowns for the user.
    Danita
    Novell Knowledge Partner
    Moving GroupWise to Linux?
    http://www.caledonia.net/gwmove.html

  • Why do I get the question about index.html when I try to publish a new site?

    When I try to publish a new or corrected ftp website (anyone)  I get a message saying that the file "index.html" already is present on the web and am asked if I want to replace it. What does that mean? I do not want to replace that site, only to publish new ones or repair old ones

    Read this to learn about the index.html file :
         The concept of iWeb Sites
    Replace the index.html file when asked.

  • The record has duplicate key values - "Include in Unique Index" checkbox missing

    I have a Silverlight client app that I'm developing in Lightswitch in VS2013 Ultimate Update 1, and have run into a problem when adding records.
    I am working against an external SQL Server 2008 database, and the table in question only has the primary key constraint, meaning that the ID field is an identity field, set as the primary key.
    When I try and add records to the table from the app, I get an error "The Shiur record has duplicate key values." This seems to happen when I add a row that has the same Speaker as an existing one. If I add one with a new Speaker then
    it inserts OK.
    Whilst searching for information on this error, I saw many comments around about there being a problem in earlier releases with the "Include in Unique Index" not working properly. This looked like my problem, except for two points...
    1) This table doesn't have anything in a unique index (as far as I know), as I never set it up to have any. You can see the details here...
    This looks to me like there is only the one index, which is the primary key one.
    2) The "Include in Unique Index" checkbox doesn't appear on my Properties panel at all. If I open the table in the designer, then click in the Speaker row, I don't see "Include in Unique Index" at all...
    Actually, I don't see "Include in Unique Index" at all, irrespective of what I click. It's just not there.
    So, I don't seem to have a unqiue constraint to violate, and VS doesn't show me the "Include in Unique Index" to allow me to check this, but I still get the error on insert. Anyone any ideas what's going on here?
    Thanks
    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers.
    Download from the Visual Studio Gallery.
    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at
    http://dotnetwhatnot.pixata.co.uk/

    Hi Alan,
    'Include in Unique Index' is for intrinsic database entity properties.
    Ah, that explains why I can't see it then :)
    Is LightSwitch or SQL throwing the error?
    Ah, you're a genius! Well, not quite, but your question led me to the answer.
    For some odd reason, the primary key fields on my tables seem to have lost their identity setting, so when it tried to insert a new record, the ID wasn't automatically increased, so was going in as zero. This worked fine for the first insert, as there wasn't
    a record with zero ID, but failed for the second.
    Changed the ID fields to be identity, and all works fine now :)
    Thanks very much.
    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers.
    Download from the Visual Studio Gallery.
    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at
    http://dotnetwhatnot.pixata.co.uk/

  • Constantly inserting into large table with unique index... Guidance?

    Hello all;
    So here is my world. We have central to our data monitoring system an oracle database running Oracle Standard One (please don't laugh... I understand it is comical) licensing.
    This DB is about 1.7 TB of small record data.
    One table in particular (the raw incoming data, 350gb, 8 billion rows, just in the table) is fed millions of rows each day in real time by two to three main "data collectors" or what have you. Data must be available in this table "as fast as possible" once it is received.
    This table has 6 columns (one varchar usually empty, a few numerics including a source id, a timestamp and a create time).
    The data is collect in chronological order (increasing timestamp) 90% of the time (though sometimes the timestamp may be very old and catch up to current). The other 10% of the time the data can be out of order according to the timestamp.
    This table has two indexes, unique (sourceid, timestamp), and a non unique (create time). (FYI, this used to be an IOT until we had to add the second index on create time, at which point a secondary index on create time slowed the IOT to a crawl)
    About 80% of this data is removed after it ages beyond 3 months; 20% is retained as "special" long term data (customer pays for longer raw source retention). The data is removed using delete statements. This table is never (99.99% of the time) updated. The indexes are not rebuilt... ever... as a rebuild is about a 20+ hour process, and without online rebuilds since we are standard one, this is just not possible.
    Now what we are observing is that the inserts into this table
    - Inserts are much slower based on a "wider" cardinality of the "sourceid" of the data being inserted. What I mean is that 10,000 inserts for 10,000 sourceid (regardless of timestamp) is MUCH, MUCH slower than 10,000 inserts for a single sourceid. This makes sense to me, as I understand it that oracle must inspect more branches of the index for uniqueness, and more different physical blocks will be used to store the new index data. There are about 2 million unique sourceId across our system.
    - Over time, oracle is requesting more and more ram to satisfy these inserts in a timely matter. My understanding here is that oracle is attempting to hold the leafs of these indexes perpetually buffers. Our system does have a 99% cache hit rate. However, we are seeing oracle requiring roughly 10GB extra ram per quarter to 6 months; we're at about 50gb of ram just for oracle already.
    - If I emulate our production load on a brand new, empty table / indexes, performance is easily 10x to 20x faster than what I see when I do the same tests with the large production copies of data.
    We have the following assumption: Partitioning this table based on good logical grouping of sourceid, and then timestamp, will help reduce the work required by oracle to verify uniqueness of data, reducing the amount of data that must be cached by oracle, and allow us to handle our "older than 3 month" at a partition level, greatly reducing table and index fragmentation.
    Based on our hardware, its going to be about a million dollar hit to upgrade to Enterprise (with partitioning), plus a couple hundred thousand a year in support. Currently I think we pay a whopping 5 grand a year in support, if that, total oracle costs. This is going to be a huge pill for our company to swallow.
    What I am looking for guidance / help on, should we really expect partitioning to make a difference here? I want to get that 10x performance difference back we see between a fresh empty system, and our current production system. I also want to limit oracles 10gb / quarter growing need for more buffer cache (the cardinality of sourceid does NOT grow by that much per quarter... maybe 1000s per quarter, out of 2 million).
    Also, please I'd appreciate it if there were no mocking comments about using standard one up to this point :) I know it is risky and insane and maybe more than a bit silly, but we make due with what we have. And all the credit in the world to oracle that their "entry" level system has been able to handle everything we've thrown at it so far! :)
    Alright all, thank you very much for listening, and I look forward to hear the opinions of the experts.

    Hello,
    Here is a link to a blog article that will give you the right questions and answers which apply to your case:
    http://jonathanlewis.wordpress.com/?s=delete+90%25
    As far as you are deleting 80% of your data (old data) based on a timestamp, then don't think at all about using the direct path insert /*+ append */ as suggested by one of the contributors to this thread. The direct path load will not re-use any free space made by the delete. You have two indexes:
    (a) unique index (sourceid, timestamp)
    (b) index(create time)
    Your delete logic (based on arrival time) will smatch your indexes as far as you are always deleting the left hand side of the index; it means you will have what we call a right hand index - In other words, the scattering of the index key per leaf block is certainly catastrophic (there is an oracle iternal function named sys_op_lidbid that will allow you to verify this index information). There is a fairly chance that your two indexes will benefit from a coalesce as already suggested:
               ALTER INDEX indexname COALESCE;This coalesce should be investigated to be done on a regular basis (may be after each 80% delete) You seem to have several sourceid for one timestamp. If the answer is yes you should think about compressing this index
        create index indexname (sourceid, timestamp) compress;     
    or
        alter index indexname rebuild compress;     You will do it only once. Your index will have a smaller size and may be more efficient than it is actually. The index compression will add an extra CPU work during an insert but it might help improving the overal insert process.
    Best Regards
    Mohamed Houri

  • Is there any performance difference between unique and no unique index

    Hi,
    We are working with both databases Oracle and MS-SQL and we have an open channel to MS-SQL server core team.
    We got the word from them that there is a difference between unique and no unique index from the optimizer perspective, i.e. the optimizer knowing that the index is unique may choose a more suitable plan for running a specific query, we're still trying to find a specific example.
    Anyway, since we do not have an open channel to Oracle core, I thought maybe one of you guys knows something about Oracle optimizer behavior on this issue.
    I am interested verified answers from certified sources and not suggestions or thoughts.
    Thanks in advanced,
    Tal ([email protected]).

    Maybe, you will like to check this link for a similar question answered by Tom Kyte
    http://asktom.oracle.com/pls/ask/f?p=4950:8:385900000490041683::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:7641143144618,

Maybe you are looking for

  • Does anyone know if the 8520 will ever be released with Sprint?

    I really want this phone, but I'm with Sprint and I'm hoping and praying to Jesus that RIM will one day make it available with Sprint, does anyone out there have any info? Thanks

  • FCP X unable to scale any still image beyond 400%-why???

    Just wondering if anyone else has run into this problem. If I try to scale any image in the Inspector window, FCP X doesn't let me scale beyond 400%. Why does FCP X place this limit? And is there any way it can be bypassed?

  • Over writing condition value

    Dear All, We have maintained condition record for BED, Scess and SHcess in our company. Now, a new requirement has come up to maintain automatic as well as manual condition types for excise duties. Whenever we enter the manual excise condition type, 

  • Bookmarks not showing when bookmark icon tapped

    Hi, I have created an ePub and am seeing a problem with it when trying to add a bookmark. Sometimes tapping the bookmark icon in the top right of the book will result in the red bookmark ribbon appearing, but then on other occasions, however much I t

  • Aperture 3.4.1 photos exported to Photoshop CS6 have pink hue

    I click on a photo in Aperture 3.4.1 and export it to Photoshop CS6. The photo has a pink hue. This never happened before, and to add to the problem, it doesn't happen with every photo...just some of them. Any thoughts? Thanks.