Physical ordering of pages after clustering
Posted in 1993
I don't have an OnLine up right now that I can test this on, so I
thought I'd run it by the gurus:
After an ALTER INDEX TO CLUSTER operation the datapages of a table are
rearranged in index order. Are they therefore contiguous? Or are they
still interleaved with index pages? If contigous, are the index pages
also organised contiguously by index? I guess this question amounts to the
following:
Is ALTER INDEX equivalent to:
CREATE newtab ...;
INSERT INTO newtab SELECT ... ORDER BY ...; CREATE INDEX ...;
. . .
. . .
. . .
DROP TABLE oldtab; RENAME TABLE newtab TO oldtab;
or equivalent to:
CREATE newtab ...;
CREATE INDEX ...;
. . .
. . .
. . .
INSERT INTO newtab SELECT ... ORDER BY ...;
DROP TABLE oldtab; RENAME TABLE newtab TO oldtab;
If, as I hope, the former behaviour is used, then am I right in thinking
that, given a large table which was static in size, it would be possible
to design your extents such that datapages were physically seperated
from index pages?
graeme
--
Disclaimer: The author's opinions are his own, and not necessarily
those of Pyramid Technology Ltd. or Pyramid Technology Inc.
---------------------------------------------------------------------------
-m------- Graeme Sargent Voice: +44 (0)252 373035
---mmm----- Senior Database Consultant Fax : +44 (0)252 373135
-----mmmmm--- Pyramid Technology Ltd. Telex: Tell who???
-------mmmmmmm- Farnborough, Hants GU14 7PL Email: graeme@pyra.co.uk
---------------------------------------------------------------------------
We have the technology. The tricky bit is learning how to use it.