Indexes and referential integrity

I'm working on a database with 1000's of tables with a lot of RI. We used the traditional approach, where each column with a relationship is indexed for performance... This has caused our database index to more than double the size of the data... Some of the larger tables were 15 indices on them in support of RI.

Given the changes with oracle over the years, I have 2 questions

(1) with skipscan, can I go out with composite indexes? I think combining some columns that would be wise for queries in a single index (I must watch null values to make sure that I get the best order). Ths is great for performance or it deteriorate too... Someone at - he experiences?

(2) compression and presentations by oracle Exadata all end with the same statement "you need not even index more... Someone at - it really to see what it means for RI? We would not have to index each referenced column? If oracle saying "you don't need index except for support of RI.

(3) what about creating unusable index on the column kid make the option optimize see a clue... I think it was a good practice to index the parent and child to help the optimizer, or maybe I'm not remembering right. Maybe something to do with the child column statistics help?

All backback power would be appreciated.

Published by: Bryan Greene on September 12, 2009 06:42

(1) with skipscan, can I go out with composite indexes?

No, not completely.

(2) compression and presentations by oracle Exadata all end with the same statement "you need not even index more... Someone at - it really to see what it means for RI? We would not have to index each referenced column? If oracle saying "you don't need index except for support of RI.

Think about why index is needed on the FK column. One of the main reasons for FK index columns is to avoid different locking issues to simultaneous environment. Oracle recommends index FKs. what Exadata whitepapers means almost no 'need index to support SELECT performance since Exadata provides speeds of sweeping pending'.

(3) what about creating unusable index on the column kid make the option optimize see a clue... I think it was a good practice to index the parent and child to help the optimizer, or maybe I'm not remembering right. Maybe something to do with the child column statistics help?

Sometimes the index could help get more accurate estimates of cardinality from of NDV in the index, but this is not the usual case.

Tags: Database

Similar Questions

  • Indexing and the integrity constraint functionality difference

    Hello

    Sometimes I confuse me, how we can distinguish between indexing and the integrity of the features of constraint. Please let me know or if any available doc.


    Kind regards
    REDA

    I assume you mean unique vs unique index constraints?

    The sole (or Primary Key) constraints provide additional metadata that can be used by the optimizer.
    An index will be used to help the database to apply the constraint (it is created, or if there is it will be "captured" by coercion)

    Insofar as a document [url http://docs.oracle.com/cd/E11882_01/server.112/e25789/toc.htm] that's something, you should read

  • ODI - deactivation and activation of referential integrity

    Hi all

    To run load ETL I must disable and then enable referential integrity of one of my paintings. I can do this by using the procedure. But after loading the disbabled interface and then, how can I automatically reverse-engineering of the table? Must she be dom = do manually or y at - it an option to automate the reverse engineering as well.

    Thanks for your time and your help.

    Just to clarify: you sound like foreign key in the Oracle database? Or are you talking about a foreign key defined in ODI logic?

    In the first case, you will need to reactivate the key on the database. Reverse engineering, something in ODI just get the metadata of ODI to be conscious, but nothing in the database changes.
    In the second case, you can disable checking of the constraint on the control tab (or you can set the flow control to false if you do not need at all).

    It is possible to reverse engineer the tables using the SDK, but I don't think you need: https://blogs.oracle.com/dataintegration/entry/odi_11g_scripting_a_reverse

  • index and foreign key

    I just read an article on the index.

    Jonathan Lewis - during indexing

    The author says that if you update the primary key or a unique key at the end of 'parent' of the referential integrity constraint Oracle locks the "child" table to find the rows of children committed and uncommitted if a suitable index does not exist. After that he says do not create indexes 'foreign key '. I mean, there is a contradiction. What do you think?

    delete this thread!

  • Referential integrity does not not for attributes 'user defined '.

    Hello

    I have trouble getting the referntial integrity to work with auxiliary attributes. I have a custom scheme I imported to the ODSEE that I would like to have referential integrity enabled for all DN links.

    To activate the referential integrity, I have done:

    (1) dsconf game-server-prop - h host Ref port - p-integrity - attr:attribute - name-Ref-integrity - attr:attribute - name (it gave me an error if there were spaces around the------so I removed the)
    (2) dsconf game-server-prop - h: host Pei Ref-integrity-enabled port: on
    (3) adds an index for each attribute (equal) in the suffix whetre objects are
    (4) restart the DS instance

    Referential integrity works for members, but not one of my custom attributes. I have also no log instance-path/logs/referint file...

    Any ideas?

    Yes, pluginarg3 and more should be your attributes syntax DN you want to maintain on referential integrity. You have over 100 separate DN syntax of the attributes that you want to enable referential integrity for? It is waay more than I've seen before.

    You don't want to change the dse.ldif file while the server is in place. If you do, you will lose your changes when the server restarts. I think it's weird that your dsconf command did not work. If you want to solve problems which you can activate the audit log and run the dsconf commands to see what changes the tool brings to the config.

    Maybe this syntax does not work:

    dsconf game-server-prop - h host Ref port - p-integrity - attr:attribute - name-Ref-integrity - attr:attribute - name

    I think I only used the plugin properties to configure this in the past, but to be honest, I usually run just a ldapmodify with an LDIF.

  • Referential integrity constraints - Impact on performance

    Y at - it any performance overhead to create constraints in referential integrity on the tables (not seen)? Can someone tell me please a documentation of oracle on the impact of the creation of RIs on peformance on the db tables?

    Thank you
    Kevin

    Please check that it has everything you need

    http://tonguc.WordPress.com/2007/01/19/what-is-the-overhead-of-referential-integrity-on-the-database/

    and don't forget to create indexes on the keys

    Coskan Gundogar

    http://Coskan.WordPress.com

  • Checking the referential integrity of a form before the presentation of the Page element

    Hi, OTN,.

    I have a form on a table with multiple columns, some of which are foreign keys to other tables. Rather than validate the columns for referential integrity when the user inserts/changes in shape, I would use a dynamic action to attract the attention of the user with a javascript alert() when the user loses focus of the element. After a user enters a value into the text box and moves to the next item, I want to be able to query the table, check the existence of the value of the user and issue a javascript alert() if there is no match.

    What is the best way to go about this?

    I created a dynamic action-to run PL/SQL code on one of the elements of the page, with a code similar to the following:

    DECLARE
    rf_check varchar2 (30);
    BEGIN
    SELECT col1 INTO table_a FROM rf_check
    WHERE col1 =: P1_ITEM_FK;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    HTP.p ("< script type =" text/javascript"> ');
    HTP.p ("alert ("ERROR");");
    HTP.p ("< /script >" ");
    END;

    I could not get the dynamic action of delivering javascript. Any thoughts?

    Thank you

    Matthew Moisen

    Published by: Matthew Moisen on 25 October 2012 14:22

    Matthew Moisen wrote:
    What is the best way to go about this?

    I have to admit that I've never tried, but I would be surprised if Javascript back via statements made htp.p that they are actually executed by the browser.

    I would do something like that, by a dynamic action that calls an application process. The PL/SQL procedure request would return via htp.p OK or ERROR. From this result, the javascript would determine to issue the alert. Something like the following (not fully tested):

    Javascipt
    
     var get = new htmldb_Get(null,html_GetElement('pFlowId').value, 'APPLICATION_PROCESS=FK_CHECK',0);
     var fk_check = get.get();
    
     if (fk_check=='ERROR')
      {
       alert('ERROR');
      }
    
    Application Process FK_CHECK
    
    DECLARE
      rf_check varchar2(30);
    BEGIN
      SELECT col1 INTO rf_check FROM table_a
      WHERE col1 = :P1_ITEM_FK;
      HTP.p('OK');
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
         HTP.p('ERROR');
    END;
    
  • referential integrity with a view to the parent table

    Is it possible to create a foreign key that uses a view as the parent table?

    CREATE TABLE one
    + (id NUMBER CONSTRAINT a_pk PRIMARY KEY, +)
    name VARCHAR2 (32));

    CREATE TABLE b
    + (name of the b_pk VARCHAR2 (32) CONSTRAINT PRIMARY KEY, +)
    address VARCHAR2 (32));

    CREATE VIEW b_view AS SELECT * FROM b;

    ALTER VIEW b_view ADD CONSTRAINT b_view_pk PRIMARY KEY (name) DISABLE NOVALIDATE;

    ALTER TABLE an ADD CONSTRAINT a_fk
    B_view (name) REFERENCES of FOREIGN KEY (name);

    "After issuing the last alter statement I get the error: ' ORA-02270: no unique or primary key corresponding to this list of columns.

    If I use just the table b of referential integrity, everything works. Is this just a limitation of the use of the view with a PK defined as disable novalidate? Is there a workaround to use the view?

    Thank you
    mcslain

    AFAIK, you can create constraints on views, purely for the sake of documentation.
    Sense: these constraints are never implemented, they must be defined using the NOVALIDATE keywords to DISABLE.

    And since these constraints, say the b_view_pk in your case, are DISABLED/NOVALIDATE, you cannot have a foreign key (ENABLED), which points to them.

    Pouvez have you a foreign key pointing at them is DISABLED/NOVALIDATE too, however.
    But I bet it's not what you want.

  • referential integrity distributed

    Hi, I have a question. If I'm on the wrong forum please direct me because I couldn't find a specific forum for distrituted databases and it can be a matter of application development.

    I implement a simple distributed database application. At this point I fear that with the creation of two tables of each on a different server. For the simplicity I will be their name table1 and table2. This is the scheme if the tables were not distributed and were located on the same server.

    CREATE TABLE table1)
    PRIMARY KEY of the CONSTRAINT of the NUMBER of table1_pk table1_id
    );

    CREATE TABLE table2)
    NUMBER of table2_id
    NUMBER of table1_id
    CONSTRAINTtable2_pk PRIMARY KEY (table2_id, table1_id),
    CONSTRAINT table2_fk FOREIGN KEY (table1_id) REFERENCES table1 (table1_id)
    );

    I talked about literature in the database Oracle® 10g Release 2 Administrator's Guide (10.2) and the Oracle database applications developer's Guide. I know I can't use declarative referential integrity, but how can I distribute the tables so that I can be sure that when I insert a row in table2, I can check to see if there is a corresponding line in table 1 for table1_id?

    Actually, I expect that you will review your architecture.

    It makes no sense to search one matching row in table1 a remote database when the data is inserted in table2 in a local database. The best scenario would be that each insertion in table2 would be overloading a network round trip plus costs of querying the table in the remote database. If the network is down or if one of the two databases is down, the application fails, that beats in general the object of a distributed application. In addition, there will be all sorts of concurrency issues (i.e. I remove a line, but before I commit to you ask the line, to see there and insert a child line.) I agree, leaving your orphan line).

    Assuming that you really do need a distributed architecture, you want to replicate table1 to the nodes the and remote. Then, you would report to referential integrity between your local copy of table1 and table2 (as well as between table1 and table2 on the remote database, assuming you wanted to table2 data available here as well). Your replication process (preferably using stream but potentially use the multi master materialized views rather) will then be coded to process the errors due to the asynchronous nature of replication (that is to notice that database1 deleted a parent row that you just inserted a child line for and solve the conflict in an appropriate manner).

    Justin

  • triggers to enforce referential integrity

    I have trouble to configure a trigger for me to ensure referential integrity. I choose a trigger because I do believe that it is possible to configure using constraints.

    My parent (HAB) table is the following structure:

    H_ID NUMBER PK
    H_CODE VARCHAR2
    H_DESCRIPTION

    The child table (ATT) is as follows

    so_id NUMBER PK
    COLUMN-NAME VARCHAR2 PK
    VALUE VARCHAR

    The ATT table contains information of documents referring to the HAB table, in these instances col_name = "HAB" (it may also contain several other value that does not refer to the table of HAB)
    When the COL_NAME = "HAB" I want to check that the VALUE column contains a value that is present in H_ID inhabitants.

    Is it possible to do with relaxation, I can't understand how to add a where clause clause, so I apply the trigger only when the column column_name = 'HAB '.

    Here is my code so far:

    CREATE OR REPLACE TRIGGER TRG_BRYO_ATT_HAB
    BEFORE THE INSERT OR UPDATE
    VALUE
    ON SO_BRY_ATT
    REFERENCING NEW AS new OLD IN the old
    FOR EACH LINE
    WHEN
    (NEW. VALUE IS NOT NULL)

    DECLARE
    INTEGER model; -used for the extraction of slider below
    Invalid_habitat EXCEPTION;
    Valid_habitat EXCEPTION;
    Mutating_table EXCEPTION;
    PRAGMA EXCEPTION_INIT (Mutating_table,-4091);

    CURSOR Dummy_cursor (hc NUMBER) IS
    SELECT h_id FROM hab
    WHERE h_id = hc
    FOR the UPDATE OF h_id.


    BEGIN

    OPEN Dummy_cursor (: New.value);
    EXTRACT Dummy_cursor IN model;


    IF Dummy_cursor % NOTFOUND THEN
    RAISE Invalid_hab;
    ON THE OTHER
    RAISE valid_hab;
    END IF;
    CLOSE Dummy_cursor;
    EXCEPTION
    WHEN Invalid_hab THEN
    CLOSE Dummy_cursor;
    Raise_application_error (-20000, 'invalid hab'
    || "code" | To_char (:New.value));
    WHEN Valid_hab THEN
    CLOSE Dummy_cursor;
    WHEN Mutating_table THEN
    NULL;

    END TRG_BRYO_ATT_HAB;



    /

    No indication on how to do this, or suggestions for the best ways to enforce this would be very appreciated.

    Thank you

    Stef

    Hello

    The reason why I want to separate data atts of standard data, it's that I want to if ensure that the database is extensible, for example if we start obtain additional data of a type new stadium for example, I don't want to have to enter a new column in the standard data column, but rather power to att in the atts table as a new type of name of column

    The short answer is, STOP! Don't, don't.

    You want to ensure that the database is expandable? -It is, just add the columns when you need it. As you say yourself, "* if * we start obtain additional data of a new type."

    When you create this kind of datamodel (that you should not), you are bound to run into all kinds of problems. One being your current with referential integrity. Other people in trouble by querying your data to produce reports, general performance, a.s.o., a.s.o. problems.

    I've only seen a situation where such a design could be claimed. It's an application where a requirement was that end-users should be able to create new entities and attributes to use immediately in the application. This doesn't seem to be the case in your situation.

    Concerning
    Peter

  • Index and MATCH with several conditions

    Hi all! I hope I can explain what I'm trying to do here clearly. This is my first shot:

    In the table below "Office entry Worksheet - area 1" I am trying to insert a formula in column B which will result in an answer ' true / false ' and be used for conditional highlighting

    The first condition that must be met is that the checkbox in the table "Labor and material Checklist" column A or check, if it is not checked, then move to the next line. If the box is checked, then the following condition would need to index and match with column C of table "Office entry Worksheet - area 1" in column B. If there is a match in column C, then move to the next line of column B in the table 'labor and material Checklist '. This continues until there is a 'match', then highlight column B in the table "entry Office sheet - surface 1" in red (or something like "MISSING task")

    It is an estimate and the idea is to ensure that the Phases that are checked in the table "Labor and material Checklist" will not miss when you use the table "entry office map - zone 1".

    Thank you very much for your help!

    Tim

    Is it possible that I can download this spreadsheet file?

  • Question indexing and backup...

    Couple questions.

    1 indexing - I created a directory "backup" off the rooy on my device via the file browser. Even with the pictures etc..., it's the area that I intend to backup just things, documents, programs, etc... To my surprise, images in this directory is indexed and illustrated with photos. Is this by design? In any case stop as long as these are usually the images that go with the product installs.

    2. I noticed in the backup agent it refers to \\myhubname\backup but that folder does not exist (this is why I created it). "However, on this backup operation (the one that installs by default), it stores data to \\myhubname\import\"directory file names "... strange.

    Any thoughts would be appreciated.

    Thank you.

    udflyer

    1. Yes, it's by design. Nothing in the files of importation or the media is indexed. I suggest using the backup folder.

    2. strange that the backup folder was not there. It is a default action.

  • movie maker error message: not indexed and cannot be imported

    I put my video clips imported from my digital camera of MOV to WMV with Format Factory and now get the error message in Movie Maker...

    The C:\...wmv file is not indexed and cannot be imported.

    Try using the free utility WMVIndexer . It is towards the bottom of the page in the given the download link.

    The utility should be easy to follow. It will add indexes to the .wmv clip to allow quick advance and rewind indexing so that WMM can then use in the edition.

  • What is this mean:MVI_3165 ~ 1.wmv is not indexed and cannot be imported?

    What is this mean:MVI_3165 ~ 1.wmv is not indexed and cannot be imported?

    The. WMV file may be corrupted somehow...
    and probably is unseekable. IOW... If you play
    the file in Windows Media Player, you can not
    Drag the search bar to advance the video.

    If you want to experiment with the repair of the
    . WMV file... the following freeware may be
    worth a try:

     
    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    AsfBinWin version 1.8 [version 1.8.2.903]
    http://www.radioactivepages.com/AsfBin.aspx
    (Windows XP - Vista - 7)
    (Intuitive, fast and reliable tool for processing
    ASF and WMV files)

    Good luck...

  • Windows movie maker error - the file is not indexed and cannot be imported

    I have converted a quicktime in WMW clip, but when I try and import the video in windows movie maker, that it comes up with error the file is not indexed and cannot be imported? What does that mean?

    Try another converter.

    There are to many converters available on the net...
    the following links are some examples.

    Proceed at your own risk *.

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    (1) format Factory (freeware)
    http://www.videohelp.com/tools/Format_Factory
    (the 'direct link' is faster)
    (the file you want to download is: > FFSetup270.zip<>
    (FWIW... installation..., you can uncheck
    ('all' boxes on the last screen)
    (Windows XP / Vista / 7)

    First, you will need to decompress the file or just open the
    Drag FFSetup270.exe out of the folder
    and drop it on your desktop. To install left click.

    (2) Freemake Free Video Converter (freeware)
    http://www.Freemake.com/free_video_converter/
    (Windows XP / Vista / 7)

    (3) Koyotesoft Free Video Converter
    http://www.koyotesoft.com/indexEn.html
    (2000/XP/2003/Vista/Seven)

    (4) Sothink Free Video Converter
    http://www.Sothinkmedia.com/video-converter/
    (Windows XP / Vista / 7)

    (5) SUPER © Simplified Universal Player Encoder & Renderer
    http://www.videohelp.com/tools/Super
    (the download mirror site is faster) (Windows XP / Vista / 7)

    (6) Xilisoft Video Converter
    http://www.Xilisoft.com/video-converter.html
    (not freeware but receives good reviews)
    (Windows XP (SP2 or later) / Vista / 7)

Maybe you are looking for

  • Transformer model Dyn11 necessary!

    I'm looking to simulate the part of the multisim power system to check a problem.  I can find a transfomer model 3 phases in the components, but need help to change its siding. As follows: Transformer DYN11 (Delta connected primary, star secondary ph

  • Windows media player rating system / random play

    I'm having a problem with my Windows media player and its rating system. After so much time to listen to all my music on random, he started playing some songs more frequently (based on evaluations of random playback) than others. (E.g. you have 100 s

  • Can not turn off the password request after inactivity

    Whenever I get out my phone, it displays a login window when I get back.  I went to the power options, checked "Don't require a password on wakeup" and rebooted, but it keeps asking for the password.  Where else this function is controlled?

  • USB camera key

    I have a Pontiac con camara. y el always operating system of the machine window 7 none reconoce el cd driver of the misma lacamara are acute there knew sistema driver're shutter

  • Screen flashing right at the top of my screen (Windows 8)

    Hey everyone, I have a question about my monitor/screen on my laptop. My laptop is a Compaq CQ58 running Windows 8. Whenever I'm on my laptop (especially of office) there is this thin white line on the top of my screen flashes constantly. Sometimes i