Performance: index vs. primary key

For reasons beyond my control, I have an Oracle database with no primary keys. Fields that would likely be primary keys, however, are indexed.
Is there any reason to believe that database performance will improve if I do add primary keys?
If yes, why?
Thank you!
-Brent

Primary keys provide unique values and an in built index on thecolumn. Since the fields are indexed converting them to primary keys shall not affect the performance.Yes, if u want unique values they can be defined as Primary Keys.
However if these fields are VARCHAR2 with large size then an index will not improve the performance. You can look at creating new PK as numeric fields with a Sequence.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Brent Christensen ([email protected]):
For reasons beyond my control, I have an Oracle database with no primary keys. Fields that would likely be primary keys, however, are indexed.
Is there any reason to believe that database performance will improve if I do add primary keys?
If yes, why?
Thank you!
-Brent<HR></BLOCKQUOTE>
null

Similar Messages

  • Function Based Indexes in Primary Key Definition

    Hello.
    I have been looking into function based indexes. I have been able to create them using unique indexes. However, when I try to create them on primary keys, the engine complains.
    Any ideas? Does anyone know if you can create function based indexes on primary keys?
    An example would be great!
    Thanks,
    Brad

    Hi,
    You can create a function-based Index by going to the Properties dialog for the Index in the Relational model (not the Physical model). If you select the Index Expression tick box, you can then enter the expression into the Expression text area.
    David

  • UNIQUE INDEX and PRIMARY KEYS

    Hi Friends,
    I am confused about primary keys.
    What is the purpose of this key again? I know it is used for unique constraints.
    Supposing I have a table with two (2) columns which are each indexed as unique.
    Then they can me both candidate at primary key right?
    So why do I need a primary key again? when I have 2 columns which are uniquely index?
    Thanks a lot

    A UNIQUE index creates a constraint such that all values in the index must be distinct. An error occurs if you try to add a new row with a key value that matches an existing row. This constraint does not apply to NULL values except for the BDB storage engine. For other engines, a UNIQUE index allows multiple NULL values for columns that can contain NULL
    The differences between the two are:
    1. Column(s) that make the Primary Key of a table cannot be NULL since by definition; the Primary Key cannot be NULL since it helps uniquely identify the record in the table. The column(s) that make up the unique index can be nullable. A note worth mentioning over here is that different RDBMS treat this differently –> while SQL Server and DB2 do not allow more than one NULL value in a unique index column, Oracle allows multiple NULL values. That is one of the things to look out for when designing/developing/porting applications across RDBMS.
    2. There can be only one Primary Key defined on the table where as you can have many unique indexes defined on the table (if needed).
    3. Also, in the case of SQL Server, if you go with the default options then a Primary Key is created as a clustered index while the unique index (constraint) is created as a non-clustered index. This is just the default behavior though and can be changed at creation time, if needed.
    So, if the unique index is defined on not null column(s), then it is essentially the same as the Primary Key and can be treated as an alternate key meaning it can also serve the purpose of identifying a record uniquely in the table.

  • Index Vs Primary Key of a table/Internal table

    Hello Friends,
    What is the difference between Key and Index of a table?
    What is the difference between creating an index and specifying "Is Unique" to "Yes" vs creating a Unique Key and specifying "Is Unique" to "Yes"?
    Thanks
    Simmi

    Hi,
    Check these posts:
    http://saptechnicalinfo.blogspot.com/2008/08/table-types-in-sap-abap.html
    http://blog.sqlauthority.com/2007/04/26/sql-server-difference-between-unique-index-vs-unique-constraint/
    http://www.w3schools.com/Sql/sql_create.asp
    http://drsql.spaces.live.com/Blog/cns!80677FB08B3162E4!1187.entry

  • Recreate indexes,triggers and primary keys.

    Hi All,
    We have done an import of few table from MS SQL Server to oracle. But we couldnt see the indexes, triggers, primary key, foreign key of those tables.
    Could you please let us know how to recreate the primary key, foreign key, indexes, triggers etc of those tables.
    Pl suggest.
    Thanks in advance!
    Regards,
    Vidhya

    >
    We have done an import of few table from MS SQL Server to oracle
    >
    What does that mean exactly? How did you do an import from sql server to Oracle?
    Post your 4 digit Oracle version (result of SELECT * FROM V$VERSION) and the exact steps you took to 'import'.

  • PRIMARY KEY PARTITIONED INDEXES 생성방법 (ORA-2429, ORA-1408)

    제품 : ORACLE SERVER
    작성날짜 : 2004-08-13
    PRIMARY KEY PARTITIONED INDEXES 생성방법 (ORA-2429, ORA-1408)
    ============================================================
    PURPOSE
    primary key partitioned indexes 를 생성하는 방법을 알아 봅니다.
    SCOPE
    Oracle Partitioning Option은 8~10g Standard Edition에서는 지원하지
    않는다.
    Example:
    SQL> -- 먼저 partitioned table TEST_A 를 생성합니다.
    SQL>
    SQL> CREATE TABLE test_a (col1 number, col2 number, col3 varchar2(20))
    2 PARTITION BY RANGE (col1, col2)
    3 (partition part_test_a_1 values less than (10, 100),
    4 partition part_test_a_2 values less than (20, 200),
    5 partition part_test_a_3 values less than (30, 300),
    6 partition part_test_a_4 values less than (40, 400));
    Table created.
    SQL> -- partitioned table TEST_B 를 생성합니다.
    SQL>
    SQL> CREATE TABLE test_b (col1 number, col2 number, col3 varchar2(20))
    2 PARTITION BY RANGE (col1, col2)
    3 (partition part_test_b_1 values less than (10, 100),
    4 partition part_test_b_2 values less than (20, 200),
    5 partition part_test_b_3 values less than (30, 300),
    6 partition part_test_b_4 values less than (40, 400));
    Table created.
    SQL> -- TEST_A 테이블에
    SQL> -- non-unique local partitioned index, IX_TEST_A 를 생성합니다.
    SQL>
    SQL> CREATE INDEX ix_test_a ON test_a(col1, col2)
    2 LOCAL
    3 (partition ix_test_a_1,
    4 partition ix_test_a_2,
    5 partition ix_test_a_3,
    6 partition ix_test_a_4);
    Index created.
    SQL> -- TEST_B 테이블에
    SQL> -- unique global partitioned index, IX_TEST_B 를 생성합니다.
    SQL>
    SQL> CREATE UNIQUE INDEX ix_test_b1 ON test_b(col1, col2)
    2 GLOBAL PARTITION BY RANGE (col1, col2)
    3 (partition ix_test_b1_1 values less than (20, 200),
    4 partition ix_test_b1_2 values less than (maxvalue, maxvalue));
    Index created.
    SQL> -- TEST_A 테이블에 rimary key constraint (PK_TEST_A) 를 추가 합니다.
    SQL>
    SQL> ALTER TABLE test_a ADD CONSTRAINT pk_test_a
    2 PRIMARY KEY (col2, col1);
    Table altered.
    SQL> -- index IX_TEST_A 를 drop 하려고 하면 다음 에러가 발생합니다.
    SQL>
    SQL> DROP INDEX ix_test_a;
    drop index ix_test_a
    ERROR at line 1:
    ORA-02429: cannot drop index used for enforcement of unique/primary key
    SQL> -- TEST_B 테이블에 partition IX_TEST_B1 에서 사용된 같은 columns 들을 사용해서
    SQL> -- 새로운 두번째 index (IX_TEST_B2) 를 생성하려고 하면
    SQL> -- 다음 에러가 발생합니다.
    SQL>
    SQL> CREATE INDEX ix_test_b2 ON test_b(col1, col2)
    2 LOCAL;
    create index ix_test_b2 on test_b(col1, col2)
    ERROR at line 1:
    ORA-01408: such column list already indexed
    SQL> -- TEST_B 테이블에 primary key constraint (PK_TEST_B) 를 추가 합니다.
    SQL>
    SQL> ALTER TABLE test_b ADD CONSTRAINT pk_test_b
    2 PRIMARY KEY (col1, col2);
    Table altered.
    SQL> -- index IX_TEST_B1 를 drop 하려고 하면 다음 에러가 발생합니다.
    SQL>
    SQL> DROP INDEX ix_test_b1;
    drop index ix_test_b1
    ERROR at line 1:
    ORA-02429: cannot drop index used for enforcement of unique/primary key
    SQL> -- indexes 들과 각 indexes 이 걸려있는 tables 의 목록입니다.
    SQL>
    SQL> SELECT index_name, partition_name, status
    2 FROM user_ind_partitions
    3 ORDER BY index_name, partition_name;
    INDEX_NAME PARTITION_NAME STATUS
    IX_TEST_A IX_TEST_A_1 USABLE
    IX_TEST_A IX_TEST_A_2 USABLE
    IX_TEST_A IX_TEST_A_3 USABLE
    IX_TEST_A IX_TEST_A_4 USABLE
    IX_TEST_B1 IX_TEST_B1_1 USABLE
    IX_TEST_B1 IX_TEST_B1_2 USABLE
    6 rows selected.
    SQL> -- TEST_A 테이블에서 primary key constraint 를 drop 합니다.
    SQL>
    SQL> ALTER TABLE test_a DROP CONSTRAINT pk_test_a;
    Table altered.
    SQL> -- TEST_B 테이블에서 primary key constraint 를 drop 합니다.
    SQL>
    SQL> ALTER TABLE test_b DROP CONSTRAINT pk_test_b;
    Table altered.
    SQL> -- indexes 들과 각 indexes 이 걸려있는 tables 의 목록을 다시 봅니다.
    SQL> -- 여기서 주의해서 보아야 할 것은 non-unique local partitioned index (IX_TEST_A)
    SQL> -- 은 drop 되지 않고 USABLE 상태로 남아 있다는 것입니다.
    SQL> -- 이렇게 되는 이유는 index (IX_TEST_A) 가 non-unique 이기 때문입니다.
    SQL> -- 반면 unique global partitioned index (IX_TEST_B) 은 drop 되었습니다.
    SQL>
    SQL> SELECT index_name, partition_name, status
    2 FROM user_ind_partitions
    3 ORDER BY index_name, partition_name;
    INDEX_NAME PARTITION_NAME STATUS
    IX_TEST_A IX_TEST_A_1 USABLE
    IX_TEST_A IX_TEST_A_2 USABLE
    IX_TEST_A IX_TEST_A_3 USABLE
    IX_TEST_A IX_TEST_A_4 USABLE
    만일 index 가 primary key 에 정의되어 있는 columns 들과 같은 columns
    을 사용해서 만들어 졌다면 primary key 는 그 underlying index 를 사용합니다.
    이것은 index 가 unique 이건 non-unique 이건 또는 global 이건 local partioned index
    이건 관계없이 적용됩니다.
    위의 예제에서 primary key 가 non-unique index 위에 생성되었다는 것을
    주의해 보시기 바랍니다. 이렇게 되는 이유는 index 안의 값들이 사실
    모두 unique 하기 때문입니다. 그렇지 않을 경우 다음 에러가 발생하게 됩니다.
    "ORA-02437: cannot enable (STEELY.PK_TEST_B) - primary key violated."
    2개의 indexes 가 같은 순서의 같은 columns 을 사용해서 만들어 질 수는 없습니다.
    위의 예제에서 TEST_B 테이블에 두번째 index (IX_TEST_B2) 를 만들려고
    했을때 다음에러가 발생하는것을 확인할 수 있었습니다.
    "ORA-01408: such column list already indexed."
    하지만 columns 들의 순서를 바꾼다면 같은 columns 들을 사용하더라도
    추가적으로 indexes 를 생성할 수 있습니다.
    index (IX_TEST_A) 와 primary key (PK_TEST_A) 에 정의된 column 순서는
    반대로 되어 있습니다. 그러나 primary key 는 IX_TEST_A 를 underlying index
    로 사용하고 있습니다.
    테이블에서 primary key constraint 가 drop 되었을때
    만일 index 가 UNIQUE index 로 생성되었다면 대응하는 index 또한 drop 됩니다.
    이 현상은 LOCAL 또는 GLOBAL partitioned indexes 모두에 적용됩니다.
    partitioning 을 최대한 활용하기 위해서는 partitioned tables/indexes
    를 생성할 때에 STORAGE clause 를 반드시 사용해야 합니다.
    Reference Documents
    <Note:74224.1>

    First, thanks for posting the code that lets us reproduce your test. That is essential for issues like this.
    Because the primary key is global you will not be able to use
    INCLUDING INDEXES
    WITH VALIDATION;And you will need to add the primary key to the temp table
    ALTER TABLE DEMO_INTERVAL_DATA_LOAD_Y ADD CONSTRAINT IDX_DEMO_ROLL_Y PRIMARY KEY (ROLL_NUM);The the exchange will work. You will need to rebuild the primary key after the exchange.

  • Primary Key modification

    Hello,
    I have a table with a primary key. There is an implicit index that is created with primary key - now I wish to alter this primary key so that I can use an another existing non-unique index (or by creating a new unique index). is there a way to achieve this? there are a lot of referentials associated with this primary key; hence I do not want to drop this primary key and re-create one.
    Thanks,
    Onkar

    Parent Table -
    +
    CREATE TABLE TEST_PARENT_1
    PARENT_ID VARCHAR2(2 BYTE),
    PARENT_NAME VARCHAR2(20 BYTE),
    PT_TIME TIMESTAMP(6)
    TABLESPACE T1
    LOGGING
    PARTITION BY RANGE (PT_TIME)
    PARTITION P1 VALUES LESS THAN (TIMESTAMP' 2012-04-01 00:00:00')
    LOGGING
    NOCOMPRESS
    TABLESPACE T1,
    PARTITION P2 VALUES LESS THAN (TIMESTAMP' 2012-05-01 00:00:00')
    LOGGING
    NOCOMPRESS
    TABLESPACE T1
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE UNIQUE INDEX PARENT_ID_1_PK ON TEST_PARENT_1
    (PARENT_ID)
    LOGGING
    TABLESPACE T1
    NOPARALLEL;
    CREATE UNIQUE INDEX TEST_PARENT_IDX_1 ON TEST_PARENT_1
    (PARENT_ID, PT_TIME)
    TABLESPACE T1
    LOGGING
    LOCAL (
    PARTITION P1
    LOGGING
    NOCOMPRESS
    TABLESPACE T1,
    PARTITION P2
    LOGGING
    NOCOMPRESS
    TABLESPACE T2
    NOPARALLEL;
    ALTER TABLE TEST_PARENT_1 ADD (
    CONSTRAINT PARENT_ID_1_PK
    PRIMARY KEY
    (PARENT_ID)
    USING INDEX PARENT_ID_1_PK);
    +
    Child Table -
    +
    CREATE TABLE TEST_CHILD_1
    PARENT_ID VARCHAR2(2 BYTE),
    CHILD_ID VARCHAR2(2 BYTE),
    CHILD_FIRST_NAME VARCHAR2(20 BYTE),
    CHILD_LAST_NAME VARCHAR2(20 BYTE),
    PT_TIME TIMESTAMP(6)
    TABLESPACE T1
    LOGGING
    PARTITION BY RANGE (PT_TIME)
    PARTITION P1 VALUES LESS THAN (TIMESTAMP' 2012-04-01 00:00:00')
    LOGGING
    NOCOMPRESS
    TABLESPACE T1,
    PARTITION P2 VALUES LESS THAN (TIMESTAMP' 2012-05-01 00:00:00')
    LOGGING
    NOCOMPRESS
    TABLESPACE T1
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE UNIQUE INDEX CHILD_ID_1_PK ON TEST_CHILD_1
    (CHILD_ID)
    LOGGING
    TABLESPACE T1
    NOPARALLEL;
    ALTER TABLE TEST_CHILD_1 ADD (
    CONSTRAINT CHILD_ID_1_PK
    PRIMARY KEY
    (CHILD_ID)
    USING INDEX CHILD_ID_1_PK);
    ALTER TABLE TEST_CHILD_1 ADD (
    CONSTRAINT FK_TEST_CHILD_1
    FOREIGN KEY (PARENT_ID)
    REFERENCES TEST_PARENT_1 (PARENT_ID)
    ON DELETE CASCADE);
    +
    I want to use TEST_PARENT_IDX_1 index for primary key in the TEST_PARENT_1 table. I hope this snippet helps.

  • Dbtable without a primary key

    hi!
    is it possible to create a db-table without a primary key? if there is a possbility, how can i do this?
    greetings
    stefan

    Hello,
    The link i provided contains all your answers. Its oracle 8i documentation release. It contains everything that you want to know about oracle 8i release.
    What Are Index-Organized Tables?
    Index-organized tables are tables with data rows grouped according to the primary key. This clustering is achieved using a B-tree index. B-tree indexes are special types of index trees that differ from regular table B-tree indexes in that they store both the primary key and non-key columns. The attributes of index-organized tables are stored entirely within the physical data structures for the index.
    Why Use Index-Organized Tables?
    Index-organized tables provide fast key-based access to table data for queries involving exact match and range searches. Changes to the table data (such as adding new rows, updating rows, or deleting rows) result only in updating the index structure (because there is no separate table storage area).
    Also, storage requirements are reduced because key columns are not duplicated in the table and index. The remaining non-key columns are stored in the index structure.
    Index-organized tables are particularly useful when you are using applications that must retrieve data based on a primary key. Also, index-organized tables are suitable for modeling application-specific index structures. For example, content-based information retrieval applications containing text, image and audio data require inverted indexes that can be effectively modeled using index-organized tables.
    See Also: For more details about index-organized tables, see Oracle8i Concepts.
    Differences Between Index-Organized and Regular Tables
    Index-organized tables are like regular tables with a primary key index on one or more of its columns. However, instead of maintaining two separate storage spaces for the table and Btree index, an index-organized table only maintains a single Btree index containing the primary key of the table and other column values.
    Index-organized tables are suitable for accessing data by way of primary key or any key that is a valid prefix of the primary key. Also, there is no duplication of key values because a separate index structure containing the key values and ROWID is not created. Table 14-1 summarizes the difference between an index-organized table and a regular table.
    Table 14-1 Comparison of Index-Organized Table with a Regular Table
    Regular Table  Index-Organized Table 
    ROWID uniquely identifies a row; primary key can be optionally specified 
    Primary key uniquely identifies a row; primary key must be specified 
    ROWID pseudo-column refers to physical block address 
    ROWID pseudocolumn refers to primary key-based logical ROWID 
    Secondary indexes store physical data 
    Secondary indexes store primary key-based logical ROWID 
    Can be stored in a hash or index cluster 
    Cannot be stored in a hash or index cluster 
    Regards,
    Shekhar Kulkarni

  • Missing Primary Keys after migartion of a MSAccess 2003 DB to oracle 9.i

    I migrate a MS Access 2003 DB to Oracle 9.i with the Oracle Migration Workbench 10.1.0.4.0. on a Windows 2k PC. All the Primary Keys of my tables are missed after migration and no Foreign Key is created.
    In the MS Access Source Model Window of OMWB are the Primary Keys detected but in migration script or in oracle db after migration there is no Primary Key applied.
    Dos anyone kows the reason for this behavior.
    Thanks for help in advance.
    Message was edited by:
    user468547
    Message was edited by:
    user468547

    Here the summary of the Model.
    Not mentioned parts are sero in the Oracle Model
    MS Access Source Model
    Table Violation Rules (0)
    Relations ( 48)
    Indexes (96)
    Primary Keys (38)
    Queries (0)
    Tables (38)
    Oracle Model
    Database (1)
    Check Constraints (0)
    Foreign Keys (48)
    Indexes (96)
    Primary Keys /Unique ... (0)
    Tables (38)
    Types (2)
    In the migration scripts the commands for creation of Foreign Keys are avaliable and delievers the error message ORA-02270. e.g.
    REM
    REM Message : Failed to create foreign key: dbwines.TBL_SERVICEPROFILESTBL_UETYPES; ORA-02270: no valid Primr- o. eindeutiger Key for this column
    Here the content of the error.log
    ** Workbench Repository : Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    Repository Connection URL: jdbc:oracle:thin:@pcathlon17002:1521:ORCL
    ** The following plugins are installed:
    ** Microsoft Access 2.0/95/97/2000/2002/2003 Plugin, Production Release 10.1.0.4.0
    ** Active Plugin : MSAccess
    oracle.mtg.migration.MigrationSQLException: Failed to get information about Oracle Model Object.
    Erschpfte Ergebnismenge:Failed to get information about Oracle Model Object.
    Erschpfte Ergebnismenge
         at oracle.mtg.oracleModel.server.OracleModelImpl.getObjectInformation(OracleModelImpl.java:476)
         at oracle.mtg.oracleModel.ui.OracleModelTypes.getAllChildren(OracleModelTypes.java:95)
         at oracle.mtg.plugin.ui.WorkbenchAllTreeNode.getChildren(WorkbenchAllTreeNode.java:133)
         at oracle.mtg.migrationUI.TreeDataSource.getItemCount(TreeDataSource.java:128)
         at oracle.ewt.dTree.DTreeDeferredParent.getItemCount(Unknown Source)
         at oracle.ewt.dTree.DTreeBaseItem.isExpandable(Unknown Source)
         at oracle.ewt.dTree.DTreeButtonDecoration.getHasButton(Unknown Source)
         at oracle.ewt.dTree.DTreeButtonDecoration.paintDecoration(Unknown Source)
         at oracle.ewt.dTree.DTreeStackingDecoration.paintDecoration(Unknown Source)
         at oracle.ewt.dTree.DTree.paintCanvasInterior(Unknown Source)
         at oracle.ewt.EwtComponent.paintInterior(Unknown Source)
         at oracle.ewt.lwAWT.SharedPainter._paintInterior(Unknown Source)
         at oracle.ewt.lwAWT.SharedPainter.paintExtents(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent._paintComponent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.paint(Unknown Source)
         at oracle.ewt.EwtComponent.paint(Unknown Source)
         at oracle.ewt.lwAWT.SharedPainter.paintExtents(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent._paintComponent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.paint(Unknown Source)
         at oracle.ewt.EwtComponent.paint(Unknown Source)
         at oracle.ewt.lwAWT.SharedPainter.paintExtents(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent._paintComponent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.paint(Unknown Source)
         at oracle.ewt.lwAWT.SharedPainter.paintExtents(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent._paintComponent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.paint(Unknown Source)
         at oracle.ewt.lwAWT.SharedPainter.paintExtents(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent._paintComponent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.paint(Unknown Source)
         at oracle.ewt.EwtComponent.paint(Unknown Source)
         at oracle.ewt.lwAWT.SharedPainter.paintExtents(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent._paintComponent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.paint(Unknown Source)
         at oracle.ewt.lwAWT.SharedPainter.paintExtents(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent._paintComponent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.paint(Unknown Source)
         at oracle.ewt.EwtComponent.paint(Unknown Source)
         at oracle.ewt.lwAWT.SharedPainter.paintExtents(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent._paintComponent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.paint(Unknown Source)
         at oracle.ewt.EwtComponent.paint(Unknown Source)
         at oracle.ewt.lwAWT.SharedPainter.paintExtents(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent._paintComponent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.paint(Unknown Source)
         at oracle.ewt.lwAWT.SharedPainter.paintExtents(Unknown Source)
         at oracle.ewt.lwAWT.SharedPainter.paint(Unknown Source)
         at oracle.ewt.lwAWT.BufferedApplet.paint(Unknown Source)
         at oracle.ewt.lwAWT.BufferedApplet.update(Unknown Source)
         at sun.awt.RepaintArea.paint(Unknown Source)
         at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    ** Shutdown : Mon Apr 10 18:36:10 CEST 2006
    ** Oracle Migration Workbench
    ** Production
    ** ( Build 20050629 )
    ** OMWB_HOME: C:\oracle\ora92\omwb
    ** user language: de
    ** user region: null
    ** user timezone:
    ** file encoding: Cp1252
    ** java version: 1.4.2_04
    ** java vendor: Sun Microsystems Inc.
    ** o.s. arch: x86
    ** o.s. name: Windows 2000
    ** o.s. version: 5.0
    ** Classpath:
    ..\lib\boot.jar
    ** Started : Mon Apr 10 18:36:14 CEST 2006
    ** Workbench Repository : Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    Repository Connection URL: jdbc:oracle:thin:@pcathlon17002:1521:ORCL
    ** The following plugins are installed:
    ** Microsoft Access 2.0/95/97/2000/2002/2003 Plugin, Production Release 10.1.0.4.0
    ** Active Plugin : MSAccess
    EXCEPTION : query()java.sql.SQLException: Stream wurde schon geschlossen
    select MESSAGE_TYPE, LOG_ID, TO_CHAR(LOG_DATE, 'dd-MM-yyyy hh24:mi:ss') LOG_DATE, PROJECT_ID, PHASE, SUBPHASE, LOG_MESSAGE, OBJECT_TYPE, OBJECT_ID, CONTEXT_DATA from MTG_LOG_TABLE WHERE PROJECT_ID = 1 and (MESSAGE_TYPE != 9999) ORDER BY LOG_ID ASC
    java.lang.NullPointerException
         at oracle.mtg.migration.LogDisplayUtility.convertToDisplayStrings(LogDisplayUtility.java:185)
         at oracle.mtg.migrationServer.LoggingImpl.getLogs(LoggingImpl.java:482)
         at oracle.mtg.migrationUI.LoggingPane.setupLogTable(LoggingPane.java:291)
         at oracle.mtg.migrationUI.LoggingPane.setupLogTable(LoggingPane.java:280)
         at oracle.mtg.migrationUI.ProgressDialog.commandStarting(ProgressDialog.java:117)
         at oracle.mtg.migrationUI.MigrationUI.commandStarting(MigrationUI.java:2427)
         at oracle.mtg.migrationUI.MigrationWizard.doMigrate(MigrationWizard.java:401)
         at oracle.mtg.migrationUI.MigrationWizard.runDialog(MigrationWizard.java:293)
         at oracle.mtg.migrationUI.ActionMenuHandler._migrate(ActionMenuHandler.java:340)
         at oracle.mtg.migrationUI.ActionMenuHandler._capture(ActionMenuHandler.java:291)
         at oracle.mtg.migrationUI.ActionMenuHandler.run(ActionMenuHandler.java:85)
         at oracle.mtg.migration.WorkerThread.run(Worker.java:268)
    ** Workbench Repository : Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    Repository Connection URL: jdbc:oracle:thin:@pcathlon17002:1521:ORCL
    ** The following plugins are installed:
    ** Microsoft Access 2.0/95/97/2000/2002/2003 Plugin, Production Release 10.1.0.4.0
    ** Active Plugin : MSAccess
    Thaks for help in advance
    Regards Steffen

  • Does ADF Business Components  work well with tables without primary Key?

    We have tables using unique index without primary key. Can ADF Business Components relate business objects based on the unique index columns of the tables?

    Hi,
    Regarding my question about the XML syntax for custom properties:
    It turned out to be another problem in the Entity object definition that caused the JDeveloper error. Other entities let me add the custom property without problems. However should anybody ever need that XML syntax, here's how you add a custom property to an entity definition in the XML code:
      <Attribute
        Name="Id"
        IsNotNull="true"
        Precision="10"
        Scale="0"
        ColumnName="ID"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        SQLType="NUMERIC"
        TableName="TABLE"
        PrimaryKey="true">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="22"/>
        </DesignTime>
        <Properties>
          <CustomProperties>
            <Property
              Name="SequenceName"
              Value="SEQ1"/>
          </CustomProperties>
        </Properties>   
      </Attribute>Best regards,
    Bart Kummel
    Edited by: Bart Kummel on Sep 8, 2009 1:14 PM

  • Difference between primary key and primary index

    Dear All,
             Hi... .Could you pls tell me the difference between primary key and primary index.
    Thanks...

    Hi,
    Primary Key : It is one which makes an entry of the field unique.No two distinct rows in a table can have the same value (or combination of values) in those columns.
    Eg: first entry is 111, if you again enter value 111 , it doesnot allow 111 again. similarly for the strings or characters or numc etc. Remember that for char or numc or string 'NAME' is not equal to 'name'.
    Primary Index: this is related to the performance .A database index is a data structure that improves the speed of operations in a table. Indices can be created using one or more columns, providing the basis for both rapid random lookups and efficient ordering of access to records. The disk space required to store the index is typically less than the storage of the table (since indices usually contain only the key-fields according to which the table is to be arranged, and excludes all the other details in the table), yielding the possibility to store indices into memory from tables that would not fit into it. In a relational database an index is a copy of part of a table. Some databases extend the power of indexing by allowing indices to be created on functions or expressions. For example, an index could be created on upper(last_name), which would only store the uppercase versions of the last_name field in the index.
    In a database , we may have a large number of records. At the time of retrieving data from the database based on a condition , it is a burden to the db server. so whenever we create a primary key , a primary index is automatically created by the system.
    If you want to maintain indices on other fields which are frequently used in where condition then you can create secondary indices.
    Reward points if helpful.
    Thanks,
    Sirisha..

  • Creating a Primary Key in SSMS without Also Creating a Clustered Index

    In the course of development (SQL Server Express 2012) I’m creating various tables which should not have a clustered index on the primary key. However, it seems as if SSMS is obsessed with always doing so. I cannot seem to find a way through the simple
    “right click on column and select "Set Primary Key" method to stop the creation of an associated clustered index. 
    I can work around it fairly easily by having SSMS generate the necessary script and then changing CLUSTERED to NONCLUSTERED, but I’m curious if there is a way to do it purely using the UI that I’m overlooking…

    To be honest, though, until I get much closer to production and have loaded a lot more data I won't know for sure one way or the other - this was more of an awareness question from my part and something that I could not find anyone ever asking on
    the web.
    To add to what David said, the performance impact in the end depends much on the size of the table size and amount of memory available to SQL Server.  All things being equal, performance will be roughly the same with both sequential and random keys
    as long as data are memory resident. But a random key greatly reduces the likelihood need data will be in memory.
    The worst case scenario for single-row selects is an even distribution of random key values, a very large table, and little SQL Server memory.  Nearly every select query will require a physical I/O in this case.  Since each spinning-media disk
    spindle is capable of only 150-200 IOPS so your throughput will be constrained accordingly.
    A big advantage of sequential key values for single-row selects is improved temporal reference locality.  In practice, the most recently inserted/accessed rows are most likely to be subsequently queried.  A single-row query will not only
    read the requested row, but the adjacent rows on the same page as well, thus avoiding costly I/O for a select of those rows.
    See http://www.dbdelta.com/improving-uniqueidentifier-performance/ for an example of how to generate sequential GUIDs from C# code.
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • Assigning primary key and index for a table

    I have a database consisting of only one table with 10 million rows which mostly looks like this:
    RECORDDATE                     ID     CLASS     VALUE
    24-JAN-12 10.52.47.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     10     156
    24-JAN-12 10.52.48.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     10     156
    24-JAN-12 10.52.48.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     6     38
    24-JAN-12 10.53.05.000000 AM     253     16     197
    24-JAN-12 10.53.06.000000 AM     98     10     150
    24-JAN-12 10.53.06.000000 AM     98     0     0
    24-JAN-12 10.53.06.000000 AM     98     4     0
    24-JAN-12 10.53.06.000000 AM     98     11     33As you can see there are several entries that look exactly the same. Currently, I don't have primary key or index for any column and have a lot of performance issues. For example this query takes more than 10 seconds to run:
    select distinct      ID
    from      scdatabase4
    where ID < 253
    order by 1Since database is not my primary job and have no background of it, I'm really confused about what to do to fix my issues. Could someone please help me in assigning primary key and index if you agree that this is the problem?!

    Execute the query below to help decide what column to index:
    SELECT COLUMN_NAME, NUM_DISTINCT, NUM_NULLS, NUM_BUCKETS, DENSITY
    FROM DBA_TAB_COL_STATISTICS
    WHERE TABLE_NAME = 'your_table_name'
    ORDER BY COLUMN_NAME;
    The important columns are:
    1) NUM_DISTINCTS: Indicates the number of distinct values. If this number is very low for a column, it indicates that this column is not a very good candidate for a B-Tree index.
    2) NUM_NULL: Indicates the number of null values for each column. A column with few null values is a good candidate for a index
    But be aware, this is not a rule, it's just a method to help decide which column will have the most benefit of index creation.

  • Rebuilding the Primary Key Index for an IOT

    Good afternoon everyone
    I am having some difficulty rebuilding an IOT. Specifically, I am trying to move the IOT from one tablespace to another. From DBA_SEGMENTS, it appears the primary Key for the IOT is what needs to be rebuilt. When I query DBA_TABLES, it shows the same name as the Index that I need to build. When I attempt to move the table to another tablespace, I get INVALID OPTION on the Alter table.
    ALTER TABLE <owner>.<table name> MOVE TABLESPACE <new tablespace name>;
    I have also tried
    ALTER INDEX <owner>.<index name> REBUILD TABLEAPCE <new tablespace name>;
    Can someone point me in the right direction as the SQL documentation is not as good as I thought for this.

    OK. Here are the three tables in question. I think the problem with these three tables is they have user-defined data types, essentially nullifying the use of ONLINE for the move option. I'm thinking I will have to export, create the table and then import.
    If anyone has any other options, i'm open do a conversation.
    OWNER TABLE_NAME IOT_NAME TABLESPACE_NAME
    NGDEV_SOAINFRA SYS_IOT_OVER_76044 AQ$_IP_QTAB_G NGDEV_SOAINFRA
    NGDEV_SOAINFRA SYS_IOT_OVER_76119 AQ$_EDN_EVENT_QUEUE_TABLE_G NGDEV_SOAINFRA
    NGDEV_SOAINFRA SYS_IOT_OVER_76148 AQ$_EDN_OAOO_DELIVERY_TABLE_G NGDEV_SOAINFRA
    3 rows selected.
    CMPW_DBA:orcl> alter table ngdev_soainfra.aq$_ip_qtab_g move tablespace soa_suite_data_01 overflow tablespace soa_suite_data_01;
    alter table ngdev_soainfra.aq$_ip_qtab_g move tablespace soa_suite_data_01 overflow tablespace soa_suite_data_01
    ERROR at line 1:
    ORA-24005: Inappropriate utilities used to perform DDL on AQ table NGDEV_SOAINFRA.AQ$_IP_QTAB_G
    Elapsed: 00:00:00.03
    CMPW_DBA:orcl> alter table ngdev_soainfra.aq$_ip_qtab_g move online tablespace soa_suite_data_01 overflow tablespace soa_suite_data_
    01;
    alter table ngdev_soainfra.aq$_ip_qtab_g move online tablespace soa_suite_data_01 overflow tablespace soa_suite_data_01
    ERROR at line 1:
    ORA-24005: Inappropriate utilities used to perform DDL on AQ table NGDEV_SOAINFRA.AQ$_IP_QTAB_G

  • Changing the index type of primary key

    Hi everyone,
    We have a table, which has one clustered index and one non clustered in index(primary). I want to drop the existing clustered index and make the primary key as clustered. Is there any easy way to do that. Will Drop_Existing help on this matter?
    Thanks
    A.G

    1. Drop index that is a clustered
    2. Drop PK consraint
    3. Create PK constraint on the col and make it clusteted
    4. create NCI index on the col which was a clustered before
    DROP INDEX IX_t1 ON dbo.t1
    GO
    ALTER TABLE dbo.t1
    DROP CONSTRAINT PK_t1
    GO
    ALTER TABLE dbo.t1 ADD CONSTRAINT
    PK_t1 PRIMARY KEY CLUSTERED 
    c
    ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    CREATE NONCLUSTERED INDEX IX_t1 ON dbo.t1
    c2
    ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

Maybe you are looking for

  • A new wi fi phone with dual sim and large touch sc...

    Hey i was thinking as nokia has started taking out dual sim phones why not now not also put wifi in it and also a large touch screen phone for people to enjoy videos in it. this would be great for people who carry two phones and nokia would then be t

  • ITunes 10.6 not opening on OSX 10.7

    Hello My iTunes will not open at all after I upgraded to 10.6. The error message I get is: Process:         iTunes [894] Path:            /Applications/iTunes.app/Contents/MacOS/iTunes Identifier:      com.apple.iTunes Version:         10.6 (10.6) Bu

  • MDI & SDI Windows in Forms 6i

    Hello, Can anyone tell me how to disable Minimize, Restore & Close Buttons of a MDI & SDI Window. Reply at [email protected] Thanx.

  • Differences in between Enhanced Package version 603 SP14 and SP16

    Hi Gurus, Can someone please provide me some insight regarding differences/enhancements in between Enhanced Package version 603 SP14 and SP16. Appreciate your help in advance. Thanks and Regards, Sanjo

  • Removing a failed Norton AV 10 coporate install.

    Hi I'm supporting a osx 10.4.5 xserve, and the client has installed Norton AV 10 coporate server console. However when they installed the mysql wasn't configured correctly. There is no uninstaller and I have tried to manually remove the files. I must