Re: Clustered Indices
Posted in 1995
Tim Cummins writes: -> -> ... -> ->According to my manual, clustering an index will place the records in ->physical order based on the index. This is a very good thing if the ->table is a stable one. It means the table can be searched more quickly ->along that index. It is not a good idea to cluster if the table ->undergoes frequent changes. When a is record inserted or deleted, every ->record after the inserted/deleted record (based on the clustered index) ->must be rewritten to maintain the physical order. This could add a lot ->of overhead to the system. -> ->Tim Cummins The manual may be misleading (I haven't looked at this section recently), but half of the above is incorrect. When you cluster an index the rows in your table are physically ordered on disk by that index. If you should add new rows, change rows, or delete rows, the clustering will not be maintained (because of the performance implications). So basically you have a good starting point. Part of the maintenance of creating a clustered table is to recluster it periodically so that all rows will once again be physically ordered on disk. Regards, - Cathy -------------------------------------------------------------------------------- Cathy Kipp e-mail: ckipp@vth1.vth.colostate.edu Phone: (970) 491-1294 Colorado State University Veterinary Teaching Hospital Fax: (970) 491-1205