Re: Index Creation Questions
Posted in 1998
Schultheis, Carol L wrote:
>
> Can someone answer some basic general questions?
>
> 1. what is the difference between creating a unique index on a column
> via the create unique index statement
> versus using the primary key constraint when creating the table.
The second one creates a unique index AND allows you to use referential
integrity.
> 2. what is the difference between creating an index on a column via the
> create index statement
> versus using the alter table and adding a foreign key constraint.
The second one creates an index AND implements automatic referential
integrity.
> 3. what does the dbexport/dbimport facility do when indices are created
> by using constraints versus
> the create index statement, specifically when the dbimport creates
> the table, is the data then loaded
> before the constraints create the index???????
All constraints are created using ALTER TABLE statements AFTER the data
is loaded into the table.
Hope that helps,
--
Mark.
+----------------------------------------------------------+-----------+
|Mark D. Stock - Informix SA http://www.informix.com |//////// /|
|mailto:mdstock@informix.com http://www.informix.com/idn |///// / //|
|http://www.iiug.org +-----------------------------------+//// / ///|
| Tel: +27 11 807 0313 |If it's slow, the users complain. |/// / ////|
| Fax: +27 11 807 2594 |If it's fast, the users keep quiet.|// / /////|
|Cell: +27 83 250 2325 |Therefore, "No news: travels fast"!|/ ////////|
+----------------------+-----------------------------------+-----------+