Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Informix Clustered Indexes
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tom Lehr  
View profile  
 More options Jan 31, 10:53 am
Newsgroups: comp.databases.informix
From: Tom Lehr <tomc...@gmail.com>
Date: Tue, 31 Jan 2012 07:53:12 -0800 (PST)
Local: Tues, Jan 31 2012 10:53 am
Subject: Informix Clustered Indexes
Hello All

Have been doing some reading about clustered indexing and wondering
what experiences other folks have had with them?
We currently do not use them in our high transaction OLTP world and am
a bit wary due to reading that they have to be "re-clustered after
table alters and are disturbed by ongoing updates" (from the manual,
although it does not specify much in details in regards to the ongoing
updates statement).

thanks in advance,
tom


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan Leffler  
View profile  
 More options Jan 31, 11:20 am
Newsgroups: comp.databases.informix
From: Jonathan Leffler <jonathan.leff...@gmail.com>
Date: Tue, 31 Jan 2012 08:20:01 -0800
Local: Tues, Jan 31 2012 11:20 am
Subject: Re: Informix Clustered Indexes

On Tue, Jan 31, 2012 at 07:53, Tom Lehr <tomc...@gmail.com> wrote:
> Have been doing some reading about clustered indexing and wondering
> what experiences other folks have had with them?
> We currently do not use them in our high transaction OLTP world and am
> a bit wary due to reading that they have to be "re-clustered after
> table alters and are disturbed by ongoing updates" (from the manual,
> although it does not specify much in details in regards to the ongoing
> updates statement).

When you alter an index to clustered, the table is rebuilt with the data in
the physical order required by the index.

When the cluster operation is complete, the table goes back to normal
operation.  Rows will be added and removed as seems appropriate, not
necessarily preserving physical order. (Indeed, usually the physical order
will not be preserved if there are delete operations; if there are only
insert and update operations that do not affect the key order, you may
continue to have good clustering).

Altering an index to not clustered is a trivial operation.  It has zero
effect on the subsequent behaviour of inserts or deletes, though.  It is
just a necessary precursor step to altering the index to clustered again.

So, at any time you want, you can alter an index to clustered, which will
rebuild your table.  You may get a small performance benefit if your
queries do scans over the table in the order of the clustered index
(because the data pages needed will be already loaded, and read-ahead has
the maximum reliability).  There is no ongoing cost to having clustered an
index.  It is usually not crucial to have the index clustered.

--
Jonathan Leffler <jonathan.leff...@gmail.com>  #include <disclaimer.h>
Guardian of DBD::Informix - v2011.0612 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Art Kagel  
View profile  
 More options Jan 31, 11:23 am
Newsgroups: comp.databases.informix
From: Art Kagel <art.ka...@gmail.com>
Date: Tue, 31 Jan 2012 11:23:38 -0500
Local: Tues, Jan 31 2012 11:23 am
Subject: Re: Informix Clustered Indexes

Inserts and updates (and even deletes if there are subsequent INSERTs)
break the clustered-ness of a clustered index unless the clustering is on a
naturally increasing key (so a serial column in the table for example.
Similarly for updates of the clustered index key values in the rows.  That
means that to maintain the efficiency that a clustered index provides for
sequential scanning and index range scans, when the query includes an ORDER
BY clause based on the clustered index key, you have to periodically
recluster the index by dropping it and recreating it (or by altering it TO
NOT CLUSTER and then altering it again TO CLUSTER).

Art

Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/

Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference.  Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mpruet  
View profile  
 More options Feb 2, 6:23 pm
Newsgroups: comp.databases.informix
From: mpruet <mpr...@us.ibm.com>
Date: Thu, 2 Feb 2012 15:23:13 -0800 (PST)
Local: Thurs, Feb 2 2012 6:23 pm
Subject: Re: Informix Clustered Indexes

> On Tue, Jan 31, 2012 at 10:53 AM, Tom Lehr <tomc...@gmail.com> wrote:
> > Hello All

> > Have been doing some reading about clustered indexing and wondering
> > what experiences other folks have had with them?
> > We currently do not use them in our high transaction OLTP world and am
> > a bit wary due to reading that they have to be "re-clustered after
> > table alters and are disturbed by ongoing updates" (from the manual,
> > although it does not specify much in details in regards to the ongoing
> > updates statement).

In my previous life, I supported a reservation system for a hotel
chain.  The inventory and rates information was maintained in distinct
tables per property.  Rates could be added in any order at any time so
they would be inserted haphazardly.

My goal was to reduce IO to these two tables because the vast majority
of lookups would be going against those two tables.   Also, the
majority of the rate/inventory was against data in the next two weeks,
even though we had two years of future inventory and rates.

So I would periodically re-cluster those tables by date.  That way I
could minimize the number of pages that had to be loaded into the
buffer for rates and inventory.  And was able to have a high write as
well as read cache hit rate.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »