Re: Index Creation Questions
Posted in 1998
I'll attempt...
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.
>
Primary key constraint does not give you the liberty of placing the indexin
a specific dbspace you want or fragment it. It's an implicit index that
gets created in the dbspace the databse is located in. All primary key
indexes could end up in one dbspace leading to space problems and also
I/O contention.
> 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.>
I'm not sure if there's any relationship between an index on a column anda
foreign key constraint. I believe a foreign key constraint comes with all
the good stuff of referential integrity and might create an implict index
(?).
Putting an index on a column has no effect on any other table's data.
> 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???????
>
Either way dbimport builds your table as it exists with all its constraints
andindices before loading the table. However, if you want to disable index
builds
and constraint checking during data loads, you should use ipload with
express mode.
Did I pass? :-)
Arun
> > Carol Schultheis
> > GIS DBA Team
> > Harrison: (914) 253-7801 Fax: (914) 253-7154 (Mon-Thurs)
> > Beacon: (914) 838-7288 Fax: (914) 838-7110 (Wed-Tues-'A' Fri)
> > Pager: (914) 545-7545
> >
> >
> >