Re: fragementing a table w/ unique indx (fwd)
Posted in 1995
> From: Mark Steele <74431.3327@CompuServe.COM> > > Am I getting myself in trouble? YES! > > I created a table, with a unique index, and round robin > fragmentation. The engine said no way (btw it's 7.1). Then I > created the table, and altered it to round robin fragmentation, > and no problem. Is that trick going to come back and haunt me I > wonder...? It is unclear whether you are going to create the table round robin, the index round robin or both. For an oltp table, fragmenting the table by round robin is a fairly good idea. Fragmenting the index by round robin is explictly forbidden. The syntax create index idx_name on frag_table ( <column_list> ) fragment by round robin in <dbspace_list> is not allowed to create indexes fragmented by round robin. However, you can create a round robin index by fragmenting the table round robin, then issuing a create index idx_name on frag_table ( <column_list> ). This will not detach the index from the data pages, but will create the index in the dbspaces the table is created in, also using the fragmention scheme of the table, in this case, round robin. I would recommend that you update statistics medium for table_name ( <column_list> ) and develop a fragmentation strategy based on the distribution returned. Good Luck..... :-) -- Dave Proksch - DBA - ValueRx - Phone: (810) 333-8622 Fax: (810) 253-6510 email: dproksch@vrx.vhi.com snail mail: 1825 South Woodward Suite 200 Bloomfield Hills, MI 48302 USA #include <std_disclaimer.h>