Simple cluster index question (sorry, I'd RTFM, but don't have a copy w/ me)
Posted in 2000
Topics: Clustering, Grid & MACH11
I just wanted to know if I was misinformed (or if Informix has changed) the way clustered indices work. If memory serves correctly, it alters the physical ordering of rows within a table.... however, updates and inserts could cause the order to be incorrect, thus making this a not too brilliant thing to do with a table whose data will change frequently. If I'm right so far, will Informix assume the index is still clustered and valid and possibly return rows in the incorrect order or perhaps not at all (since it's making assumptions about the physical order?). Thanks in advance
If you force the query to read the data through the clustered index, it will come back in the desired order. Similarly, if you put an order by in the select it will come back in the desired order. However, if you just scan the table, you are likely to get rows out of order if any new rows have been inserted or key values updated since the clustered index was built. Essentially, it behaves just like a nornal nonclustered index after it has been built. Jay Buckler Danny Wright <danwright@bigfooot.com> wrote in message news:A57876D1327CAC1C.9CF65F551C9B9360.FB090929D16CEE95@lp.airnews.net... > I just wanted to know if I was misinformed (or if Informix has changed) > the way clustered indices work. > > If memory serves correctly, it alters the physical ordering of rows > within a table.... > > however, updates and inserts could cause the order to be incorrect, thus > making this a not too brilliant thing to do with a table whose data will > change frequently. > > > If I'm right so far, will Informix assume the index is still clustered > and valid and possibly return rows in the incorrect order or perhaps not > at all (since it's making assumptions about the physical order?). > > > Thanks in advance >