Re: How to fragment a primary key?
Posted in 1999
From: Francisco Gaspar <pgaspar@sistel.es>
>
><!doctype html public "-//w3c//dtd html 4.0 transitional//en">
><html>
Shame on you for sending HTML onto a newsgroup!
>I created a table with a primary key, so I want to fragment the data and
>the index.
><p>How can I do this?
><p>Thanks in advance.
Well, you _could_ read the manual, I suppose. You'll find it at
http://www.informix.com/answers/ -- get the SQL Syntax Guide.
Oh? You couldn't be bothered? Well, let's say your table looks like this:
create table a
(
pkey int primary key,
field1 char(20)
);
Then this:
alter fragment on table a init fragment by expression
mod(pkey, 5) = 0 in dbspace1,
mod(pkey, 5) = 1 in dbspace2,
mod(pkey, 5) = 2 in dbspace3,
mod(pkey, 5) = 3 in dbspace4,mod(pkey, 5) = 4 in dbspace5;
will fragment your data and indexes in the same fashion. Don't do this with
ROUND ROBIN fragmentation though.
HTH.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com