Re: Growth of Index

From: Jim Smith <Jim_at_jimsmith.demon.co.uk>
Date: 1995/07/25
Message-ID: <806698419snz_at_jimsmith.demon.co.uk>#1/1


In article <3v1jt8$7ss_at_newsbf02.news.aol.com> srtope_at_aol.com "SRTOPE" writes:

> I'm interested in the observation that an index will grow if records are
> added on one side of the index. I have one byte indexes on 1 million row
> tables that continue to grow and grow. These indexes are generally yes/no
> columns: a number of rows get created with an 'N' and then are updated to
> a 'Y' when the record is further processed, hence a huge number of 'Y'
> records are created in the index. Is this lopsided updating the reason for
> my index growth?
>

Yes.

Are you sure this index is wise?

An index on a column with only two possible values is normally very inefficiient. Put simplistically, a query will always have to retrieve half the values in the index, and then check the table for other criteria. You would be better off doing full table scans.

The index may be of benefit if a small proportion of the values are N and queries always say "where x='N'".

IS it possible to concatenate this column with another for indexing purposes?

-- 
Jim Smith
Received on Tue Jul 25 1995 - 00:00:00 CEST

Original text of this message