Re: Index Creation Questions
Posted in 1998
Mark D. Stock wrote:
>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.
>
Sorry, IMHO the UNIQUE INDEX _allows_ using of foreign keys on it.
The difference is that PRIMARY KEYs don't allow the columns with
NULL's. May be I'm wrong.
>> 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"!|/ ////////|
>+----------------------+-----------------------------------+-----------+
--
Octav Chiriac Phone: (373) 2 21 20 96
NetInfo S.R.L. Fax: (373) 2 21 20 96
Chisinau (373) 2 24 00 83
Moldova, Republic of mailto:com@netinfo.moldova.net