Re: attached index



Floyd Wellershaus wrote:
We have a query that runs kind of slow, which is exacerbated by the fact that it has to run millions of times.
It's searching on partial firstname and lastname.
It is using a composite index but I notice that this index as created with a storage parameter of "in table".
Wouldn't I expect to get better performance by detaching that index to another dbspace ?

In-table indexes perform better for index scans, ie identifying a starting key in a partial key or >= search in the index and scanning the nodes sequentially until a non-qualifying key is found. This works IFF the data pages are closely colocated with the index pages that reference them. When a table grows with few deletes and the key is the natural key of the table, or when a table is clustered and the index being scanned is the cluster key index, (ex: a datetime, an invoice number, or a serial column) then this is the case and the likely reason that Online and early IDS indexes defaulted to this modality. This was a common way online was used for 3rd party applications originally.

However, if these conditions do not hold, if the data pages and index pages are not colocated - as happens when there are extensive deletion or if the index being scanned is not a natural key - then detached indexes will perform better. The changes in the way IDS is used over the years, the popularity of larger more complex schemas and queries, is likely the reason that the default was changed to detached or semi-attached.

Art S. Kagel
.



Relevant Pages

  • Re: attached index
    ... It's searching on partial firstname and lastname. ... Wouldn't I expect to get better performance by detaching that index to another dbspace? ... When a table grows with few deletes and the key is the natural key of the table, or when a table is clustered and the index being scanned is the cluster key index, then this is the case and the likely reason that Online and early IDS indexes defaulted to this modality. ...
    (comp.databases.informix)
  • Re: Legal Surname Changes
    ... If the person or their family was either rich, ... newspapers, and the local newspaper. ... now it is indexed online. ... Also worth searching on your favourite family names for notices, ...
    (soc.genealogy.britain)
  • Re: HDIO_SET_DMA failed: Operation not permitted
    ... Hash: SHA1 ... >> What is the reason? ... > Did you try searching with google, using text from the message, your ...
    (Fedora)
  • Re: Is Doherty To Blame?
    ... Recruiting away again in Coach Gutridgeville ... Searching for my lost McDonald's AA ... Don't know the reason they stayed here all season ...
    (rec.sport.basketball.college)
  • Re: Fastest way to search text file for string
    ... I guess the reason why you are ... But I'm gathering from your reaction and style that you likely work in the ... >> searching would generally be limited to one search per file, so reading, ... >> indexing, do several indexed searches, and then expiring the indexing ...
    (microsoft.public.dotnet.languages.csharp)