Simple questions about indexes... 
Author Message
 Simple questions about indexes...
Hi,

Let a table TOTO with a column COUNTRY_CODE.
Must I create an index if the table of countries (Primary
Key=COUNTRY_CODE) contains about 300 records ?
And is it true that too many indexes can slow the UPDATE or INSERT
statements?
Thanks in advance for any answer.

Christian.



Sat, 23 Jun 2001 03:00:00 GMT
 Simple questions about indexes...

This is in ref. to DB2 UDB.

If you define a primary key for the table, db2 will create a unique
index to enforce the uniqueness of the primary key. If you want a
uniqueness enforcement by db2, you have to define the primary key (or
a unique index).

Every new index on a table will increase the time required to finish
an update or insert. You should only define the indices that you need
for correctness and efficient processing of your workload.
--

Regards,
--
Haider



Sat, 23 Jun 2001 03:00:00 GMT
 Simple questions about indexes...
There is additional overhead to maintain indexed tables.  Increasing the
number
of indexes increases the number of maintenance tasks (e.g. update and delete
index entries, etc.);  there is a trade-off between the overhead versus the
benefit
gained from the addition of another index.

You never have to define indices, but if the table is used for significant
number of
look-ups and is updated infrequently (this sounds fairly static), you can
define as
many indexes as you want because you won't incur very much maintenance
overhead.

Hope that helps,
John Turincs
Emerging Technologies
DBA

--------------------------------------------
Hi,

Let a table TOTO with a column COUNTRY_CODE.
Must I create an index if the table of countries (Primary
Key=COUNTRY_CODE) contains about 300 records ?
And is it true that too many indexes can slow the UPDATE or INSERT
statements?
Thanks in advance for any answer.

Christian.



Sat, 30 Jun 2001 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Simple question about indexes.

2. SQL7, SIMPLE SIMPLE SIMPLE question

3. Simple question on Text Indexing

4. Simple Indexing Question

5. Simple Question: Fragmentation on data & indexes

6. Simple 6.5 index question?

7. Hopefully simple index question

8. Simple Index question

9. Simple Index Hints Questions

10. Simple Index Hints question

11. Simple cluster index question (sorry, I'd RTFM, but don't hav

12. Simple index question


 
Powered by phpBB® Forum Software