fragmentation error
Posted in 2006
A user on IDS 10 tried to create an expression-fragmented table using named partitions. Two problems: (1) writing "remainder partition pt_r in dbspace" gave error 201 syntax error, and (2) with a plain remainder clause the table created but CREATE INDEX failed with error 212 / ISAM 101 (file not open). Replies clarified that the remainder clause takes no partition name (just "remainder in <dbspace>"), and that when a remainder fragment is present the index must specify a storage location, e.g. CREATE INDEX ... USING btree IN dbdw00. No further confirmation from the poster is recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Storage & Space Management, Error Codes & Troubleshooting, Data Types & Schema Design
I have the script and problems. case 1 ) If I have a remainder partition, it has synatx error, create table "informix".ds_arch ( dataset_name varchar(255,44) not null , archive_site char(10) not null , path_name varchar(250,50), archive_dt datetime year to second ) fragment by expression partition pt1 (archive_dt < datetime(2003-06-01 00:00:00) year to second) in dbdw00 , partition pt2 ((archive_dt >= datetime(2003-06-01 00:00:00) year to second ) AND (archive_dt < datetime(2003-08-10 00:00:00) year to second ) ) in dbdw00 , partition pt3 ((archive_dt >= datetime(2003-08-10 00:00:00) year to second ) AND (archive_dt < datetime(2004-01-01 00:00:00) year to second ) ) in dbdw00 , partition pt4 ((archive_dt >= datetime(2004-01-01 00:00:00) year to second ) AND (archive_dt < datetime(2005-08-10 00:00:00) year to second ) ) in dbdw00 , partition pt5 ((archive_dt >= datetime(2005-08-10 00:00:00) year to second ) AND (archive_dt < datetime(2007-01-01 00:00:00) year to second ) ) in dbdw01 , partition pt6 ((archive_dt >= datetime(2007-01-01 00:00:00) year to second ) AND (archive_dt < datetime(2008-01-01 00:00:00) year to second ) ) in dbdw01 , remainder partition pt_r in dbdw01 extent size 4096 next size 4096 lock mode row; # ^ # 201: A syntax error has occurred. # create index "informix".ds_arch_idx on "informix".ds_arch (archive_dt) using btree ; create unique index "informix".ds_arch_uidx on "informix".ds_arch (dataset_name,archive_site,archive_dt) using btree ; alter table "informix".ds_arch add constraint primary key (dataset_name, archive_site,archive_dt) constraint "informix".ds_arch_pk ; case 2): If delete remainder partition, the table can be created, but Index creation error, create table "informix".ds_arch ( dataset_name varchar(255,44) not null , archive_site char(10) not null , path_name varchar(250,50), archive_dt datetime year to second ) fragment by expression partition pt1 (archive_dt < datetime(2003-06-01 00:00:00) year to second) in dbdw00 , partition pt2 ((archive_dt >= datetime(2003-06-01 00:00:00) year to second ) AND (archive_dt < datetime(2003-08-10 00:00:00) year to second ) ) in dbdw00 , partition pt3 ((archive_dt >= datetime(2003-08-10 00:00:00) year to second ) AND (archive_dt < datetime(2004-01-01 00:00:00) year to second ) ) in dbdw00 , partition pt4 ((archive_dt >= datetime(2004-01-01 00:00:00) year to second ) AND (archive_dt < datetime(2005-08-10 00:00:00) year to second ) ) in dbdw00 , partition pt5 ((archive_dt >= datetime(2005-08-10 00:00:00) year to second ) AND (archive_dt < datetime(2007-01-01 00:00:00) year to second ) ) in dbdw01 , partition pt6 ((archive_dt >= datetime(2007-01-01 00:00:00) year to second ) AND (archive_dt < datetime(2008-01-01 00:00:00) year to second ) ) in dbdw01 , remainder in dbdw01 extent size 4096 next size 4096 lock mode row; create index "informix".ds_arch_idx on "informix".ds_arch (archive_dt) using btree ; # ^ # 212: Cannot add index. # # 101: ISAM error: file is not open. # # create unique index "informix".ds_arch_uidx on "informix".ds_arch (dataset_name,archive_site,archive_dt) using btree ; alter table "informix".ds_arch add constraint primary key (dataset_name, archive_site,archive_dt) constraint "informix".ds_arch_pk ; Thank you very much, Quman
Loose the 'partition <partitionname> ' clause. That's not Informix syntax. Read the manual. Art S. Kagel ----- Original Message ----- From: Quman <ids@iiug.org> At: 6/19 14:18:40 I have the script and problems. case 1 ) If I have a remainder partition, it has synatx error, create table "informix".ds_arch ( dataset_name varchar(255,44) not null , archive_site char(10) not null , path_name varchar(250,50), archive_dt datetime year to second ) fragment by expression partition pt1 (archive_dt < datetime(2003-06-01 00:00:00) year to second) in dbdw00 , partition pt2 ((archive_dt >= datetime(2003-06-01 00:00:00) year to second ) AND (archive_dt < datetime(2003-08-10 00:00:00) year to second ) ) in dbdw00 , partition pt3 ((archive_dt >= datetime(2003-08-10 00:00:00) year to second ) AND (archive_dt < datetime(2004-01-01 00:00:00) year to second ) ) in dbdw00 , partition pt4 ((archive_dt >= datetime(2004-01-01 00:00:00) year to second ) AND (archive_dt < datetime(2005-08-10 00:00:00) year to second ) ) in dbdw00 , partition pt5 ((archive_dt >= datetime(2005-08-10 00:00:00) year to second ) AND (archive_dt < datetime(2007-01-01 00:00:00) year to second ) ) in dbdw01 , partition pt6 ((archive_dt >= datetime(2007-01-01 00:00:00) year to second ) AND (archive_dt < datetime(2008-01-01 00:00:00) year to second ) ) in dbdw01 , remainder partition pt_r in dbdw01 extent size 4096 next size 4096 lock mode row; # ^ # 201: A syntax error has occurred. # create index "informix".ds_arch_idx on "informix".ds_arch (archive_dt) using btree ; create unique index "informix".ds_arch_uidx on "informix".ds_arch (dataset_name,archive_site,archive_dt) using btree ; alter table "informix".ds_arch add constraint primary key (dataset_name, archive_site,archive_dt) constraint "informix".ds_arch_pk ; case 2): If delete remainder partition, the table can be created, but Index creation error, create table "informix".ds_arch ( dataset_name varchar(255,44) not null , archive_site char(10) not null , path_name varchar(250,50), archive_dt datetime year to second ) fragment by expression partition pt1 (archive_dt < datetime(2003-06-01 00:00:00) year to second) in dbdw00 , partition pt2 ((archive_dt >= datetime(2003-06-01 00:00:00) year to second ) AND (archive_dt < datetime(2003-08-10 00:00:00) year to second ) ) in dbdw00 , partition pt3 ((archive_dt >= datetime(2003-08-10 00:00:00) year to second ) AND (archive_dt < datetime(2004-01-01 00:00:00) year to second ) ) in dbdw00 , partition pt4 ((archive_dt >= datetime(2004-01-01 00:00:00) year to second ) AND (archive_dt < datetime(2005-08-10 00:00:00) year to second ) ) in dbdw00 , partition pt5 ((archive_dt >= datetime(2005-08-10 00:00:00) year to second ) AND (archive_dt < datetime(2007-01-01 00:00:00) year to second ) ) in dbdw01 , partition pt6 ((archive_dt >= datetime(2007-01-01 00:00:00) year to second ) AND (archive_dt < datetime(2008-01-01 00:00:00) year to second ) ) in dbdw01 , remainder in dbdw01 extent size 4096 next size 4096 lock mode row; create index "informix".ds_arch_idx on "informix".ds_arch (archive_dt) using btree ; # ^ # 212: Cannot add index. # # 101: ISAM error: file is not open. # # create unique index "informix".ds_arch_uidx on "informix".ds_arch (dataset_name,archive_site,archive_dt) using btree ; alter table "informix".ds_arch add constraint primary key (dataset_name, archive_site,archive_dt) constraint "informix".ds_arch_pk ; Thank you very much, Quman ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.
IDS V10 has partition definition. On 6/19/06, ART KAGEL, .... <kagel@bloomberg.net> wrote: > > > Loose the 'partition <partitionname> ' clause. That's not Informix syntax. > Read the manual. > > Art S. Kagel > ----- Original Message ----- > From: Quman <ids@iiug.org> > At: 6/19 14:18:40 > > I have the script and problems. > > case 1 ) If I have a remainder partition, it has synatx error, > > create table "informix".ds_arch > ( > > dataset_name varchar(255,44) not null , > > archive_site char(10) not null , > > path_name varchar(250,50), > > archive_dt datetime year to second > ) > fragment by expression > > partition pt1 (archive_dt < datetime(2003-06-01 00:00:00) year to > second) in dbdw00 , > > partition pt2 ((archive_dt >= datetime(2003-06-01 00:00:00) year to > second > > ) AND (archive_dt < datetime(2003-08-10 00:00:00) year to > second ) ) in dbdw00 , > > partition pt3 ((archive_dt >= datetime(2003-08-10 00:00:00) year to > second > > ) AND (archive_dt < datetime(2004-01-01 00:00:00) year to > second ) ) in dbdw00 , > > partition pt4 ((archive_dt >= datetime(2004-01-01 00:00:00) year to > second > > ) AND (archive_dt < datetime(2005-08-10 00:00:00) year to > second ) ) in dbdw00 , > > partition pt5 ((archive_dt >= datetime(2005-08-10 00:00:00) year to > second > > ) AND (archive_dt < datetime(2007-01-01 00:00:00) year to > second ) ) in dbdw01 , > > partition pt6 ((archive_dt >= datetime(2007-01-01 00:00:00) year to > second > > ) AND (archive_dt < datetime(2008-01-01 00:00:00) year to > second ) ) in dbdw01 , > > remainder partition pt_r in dbdw01 extent size 4096 next size 4096 lock > mode row; > # ^ > # 201: A syntax error has occurred. > # > > create index "informix".ds_arch_idx on "informix".ds_arch (archive_dt) > using > btree ; > create unique index "informix".ds_arch_uidx on "informix".ds_arch > > (dataset_name,archive_site,archive_dt) using btree ; > alter table "informix".ds_arch add constraint primary key (dataset_name, > > archive_site,archive_dt) constraint "informix".ds_arch_pk > > ; > > case 2): If delete remainder partition, the table can be created, but > Index creation error, > > create table "informix".ds_arch > ( > > dataset_name varchar(255,44) not null , > > archive_site char(10) not null , > > path_name varchar(250,50), > > archive_dt datetime year to second > ) > fragment by expression > > partition pt1 (archive_dt < datetime(2003-06-01 00:00:00) year to > second) in dbdw00 , > > partition pt2 ((archive_dt >= datetime(2003-06-01 00:00:00) year to > second > > ) AND (archive_dt < datetime(2003-08-10 00:00:00) year to > second ) ) in dbdw00 , > > partition pt3 ((archive_dt >= datetime(2003-08-10 00:00:00) year to > second > > ) AND (archive_dt < datetime(2004-01-01 00:00:00) year to > second ) ) in dbdw00 , > > partition pt4 ((archive_dt >= datetime(2004-01-01 00:00:00) year to > second > > ) AND (archive_dt < datetime(2005-08-10 00:00:00) year to > second ) ) in dbdw00 , > > partition pt5 ((archive_dt >= datetime(2005-08-10 00:00:00) year to > second > > ) AND (archive_dt < datetime(2007-01-01 00:00:00) year to > second ) ) in dbdw01 , > > partition pt6 ((archive_dt >= datetime(2007-01-01 00:00:00) year to > second > > ) AND (archive_dt < datetime(2008-01-01 00:00:00) year to > second ) ) in dbdw01 , > > remainder in dbdw01 extent size 4096 next size 4096 lock mode row; > > create index "informix".ds_arch_idx on "informix".ds_arch (archive_dt) > using > btree ; > # > ^ > # 212: Cannot add index. > # > # 101: ISAM error: file is not open. > # > # > create unique index "informix".ds_arch_uidx on "informix".ds_arch > > (dataset_name,archive_site,archive_dt) using btree ; > alter table "informix".ds_arch add constraint primary key (dataset_name, > > archive_site,archive_dt) constraint "informix".ds_arch_pk > > ; > > Thank you very much, > Quman > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > >
Sorry, old manual version. I want to say that there's a missing set of parenthesis somewhere but I can't find it in the new syntax manuals. Art S. Kagel ----- Original Message ----- From: Quman <ids@iiug.org> At: 6/19 14:32:50 IDS V10 has partition definition. On 6/19/06, ART KAGEL, .... <kagel@bloomberg.net> wrote: > > > Loose the 'partition <partitionname> ' clause. That's not Informix syntax. > Read the manual. > > Art S. Kagel > ----- Original Message ----- > From: Quman <ids@iiug.org> > At: 6/19 14:18:40 > > I have the script and problems. > > case 1 ) If I have a remainder partition, it has synatx error, > > create table "informix".ds_arch > ( > > dataset_name varchar(255,44) not null , > > archive_site char(10) not null , > > path_name varchar(250,50), > > archive_dt datetime year to second > ) > fragment by expression > > partition pt1 (archive_dt < datetime(2003-06-01 00:00:00) year to > second) in dbdw00 , > > partition pt2 ((archive_dt >= datetime(2003-06-01 00:00:00) year to > second > > ) AND (archive_dt < datetime(2003-08-10 00:00:00) year to > second ) ) in dbdw00 , > > partition pt3 ((archive_dt >= datetime(2003-08-10 00:00:00) year to > second > > ) AND (archive_dt < datetime(2004-01-01 00:00:00) year to > second ) ) in dbdw00 , > > partition pt4 ((archive_dt >= datetime(2004-01-01 00:00:00) year to > second > > ) AND (archive_dt < datetime(2005-08-10 00:00:00) year to > second ) ) in dbdw00 , > > partition pt5 ((archive_dt >= datetime(2005-08-10 00:00:00) year to > second > > ) AND (archive_dt < datetime(2007-01-01 00:00:00) year to > second ) ) in dbdw01 , > > partition pt6 ((archive_dt >= datetime(2007-01-01 00:00:00) year to > second > > ) AND (archive_dt < datetime(2008-01-01 00:00:00) year to > second ) ) in dbdw01 , > > remainder partition pt_r in dbdw01 extent size 4096 next size 4096 lock > mode row; > # ^ > # 201: A syntax error has occurred. > # > > create index "informix".ds_arch_idx on "informix".ds_arch (archive_dt) > using > btree ; > create unique index "informix".ds_arch_uidx on "informix".ds_arch > > (dataset_name,archive_site,archive_dt) using btree ; > alter table "informix".ds_arch add constraint primary key (dataset_name, > > archive_site,archive_dt) constraint "informix".ds_arch_pk > > ; > > case 2): If delete remainder partition, the table can be created, but > Index creation error, > > create table "informix".ds_arch > ( > > dataset_name varchar(255,44) not null , > > archive_site char(10) not null , > > path_name varchar(250,50), > > archive_dt datetime year to second > ) > fragment by expression > > partition pt1 (archive_dt < datetime(2003-06-01 00:00:00) year to > second) in dbdw00 , > > partition pt2 ((archive_dt >= datetime(2003-06-01 00:00:00) year to > second > > ) AND (archive_dt < datetime(2003-08-10 00:00:00) year to > second ) ) in dbdw00 , > > partition pt3 ((archive_dt >= datetime(2003-08-10 00:00:00) year to > second > > ) AND (archive_dt < datetime(2004-01-01 00:00:00) year to > second ) ) in dbdw00 , > > partition pt4 ((archive_dt >= datetime(2004-01-01 00:00:00) year to > second > > ) AND (archive_dt < datetime(2005-08-10 00:00:00) year to > second ) ) in dbdw00 , > > partition pt5 ((archive_dt >= datetime(2005-08-10 00:00:00) year to > second > > ) AND (archive_dt < datetime(2007-01-01 00:00:00) year to > second ) ) in dbdw01 , > > partition pt6 ((archive_dt >= datetime(2007-01-01 00:00:00) year to > second > > ) AND (archive_dt < datetime(2008-01-01 00:00:00) year to > second ) ) in dbdw01 , > > remainder in dbdw01 extent size 4096 next size 4096 lock mode row; > > create index "informix".ds_arch_idx on "informix".ds_arch (archive_dt) > using > btree ; > # > ^ > # 212: Cannot add index. > # > # 101: ISAM error: file is not open. > # > # > create unique index "informix".ds_arch_uidx on "informix".ds_arch > > (dataset_name,archive_site,archive_dt) using btree ; > alter table "informix".ds_arch add constraint primary key (dataset_name, > > archive_site,archive_dt) constraint "informix".ds_arch_pk > > ; > > Thank you very much, > Quman > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.
The remainder clause doesn't require the "partition" keyword... fragment by expression partition part_0001 (cust_cd = '0001' ) in datadbs18 , remainder in datadbs18 Patrick McDonough -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of ART KAGEL, .... Sent: Monday, June 19, 2006 11:50 AM To: ids@iiug.org Subject: Re: fragmentation error [6984] Sorry, old manual version. I want to say that there's a missing set of parenthesis somewhere but I can't find it in the new syntax manuals. Art S. Kagel ----- Original Message ----- From: Quman <ids@iiug.org> At: 6/19 14:32:50 IDS V10 has partition definition. On 6/19/06, ART KAGEL, .... <kagel@bloomberg.net> wrote: > > > Loose the 'partition <partitionname> ' clause. That's not Informix syntax. > Read the manual. > > Art S. Kagel > ----- Original Message ----- > From: Quman <ids@iiug.org> > At: 6/19 14:18:40 > > I have the script and problems. > > case 1 ) If I have a remainder partition, it has synatx error, > > create table "informix".ds_arch > ( > > dataset_name varchar(255,44) not null , > > archive_site char(10) not null , > > path_name varchar(250,50), > > archive_dt datetime year to second > ) > fragment by expression > > partition pt1 (archive_dt < datetime(2003-06-01 00:00:00) year to > second) in dbdw00 , > > partition pt2 ((archive_dt >= datetime(2003-06-01 00:00:00) year to > second > > ) AND (archive_dt < datetime(2003-08-10 00:00:00) year to > second ) ) in dbdw00 , > > partition pt3 ((archive_dt >= datetime(2003-08-10 00:00:00) year to > second > > ) AND (archive_dt < datetime(2004-01-01 00:00:00) year to > second ) ) in dbdw00 , > > partition pt4 ((archive_dt >= datetime(2004-01-01 00:00:00) year to > second > > ) AND (archive_dt < datetime(2005-08-10 00:00:00) year to > second ) ) in dbdw00 , > > partition pt5 ((archive_dt >= datetime(2005-08-10 00:00:00) year to > second > > ) AND (archive_dt < datetime(2007-01-01 00:00:00) year to > second ) ) in dbdw01 , > > partition pt6 ((archive_dt >= datetime(2007-01-01 00:00:00) year to > second > > ) AND (archive_dt < datetime(2008-01-01 00:00:00) year to > second ) ) in dbdw01 , > > remainder partition pt_r in dbdw01 extent size 4096 next size 4096 lock > mode row; > # ^ > # 201: A syntax error has occurred. > # > > create index "informix".ds_arch_idx on "informix".ds_arch (archive_dt) > using > btree ; > create unique index "informix".ds_arch_uidx on "informix".ds_arch > > (dataset_name,archive_site,archive_dt) using btree ; > alter table "informix".ds_arch add constraint primary key (dataset_name, > > archive_site,archive_dt) constraint "informix".ds_arch_pk > > ; > > case 2): If delete remainder partition, the table can be created, but > Index creation error, > > create table "informix".ds_arch > ( > > dataset_name varchar(255,44) not null , > > archive_site char(10) not null , > > path_name varchar(250,50), > > archive_dt datetime year to second > ) > fragment by expression > > partition pt1 (archive_dt < datetime(2003-06-01 00:00:00) year to > second) in dbdw00 , > > partition pt2 ((archive_dt >= datetime(2003-06-01 00:00:00) year to > second > > ) AND (archive_dt < datetime(2003-08-10 00:00:00) year to > second ) ) in dbdw00 , > > partition pt3 ((archive_dt >= datetime(2003-08-10 00:00:00) year to > second > > ) AND (archive_dt < datetime(2004-01-01 00:00:00) year to > second ) ) in dbdw00 , > > partition pt4 ((archive_dt >= datetime(2004-01-01 00:00:00) year to > second > > ) AND (archive_dt < datetime(2005-08-10 00:00:00) year to > second ) ) in dbdw00 , > > partition pt5 ((archive_dt >= datetime(2005-08-10 00:00:00) year to > second > > ) AND (archive_dt < datetime(2007-01-01 00:00:00) year to > second ) ) in dbdw01 , > > partition pt6 ((archive_dt >= datetime(2007-01-01 00:00:00) year to > second > > ) AND (archive_dt < datetime(2008-01-01 00:00:00) year to > second ) ) in dbdw01 , > > remainder in dbdw01 extent size 4096 next size 4096 lock mode row; > > create index "informix".ds_arch_idx on "informix".ds_arch (archive_dt) > using > btree ; > # > ^ > # 212: Cannot add index. > # > # 101: ISAM error: file is not open. > # > # > create unique index "informix".ds_arch_uidx on "informix".ds_arch > > (dataset_name,archive_site,archive_dt) using btree ; > alter table "informix".ds_arch add constraint primary key (dataset_name, > > archive_site,archive_dt) constraint "informix".ds_arch_pk > > ; > > Thank you very much, > Quman > > > > ************************************************************************ ******* > Forum Note: Use "Reply" to post a response in the discussion forum. > > > > ************************************************************************ ******* > Forum Note: Use "Reply" to post a response in the discussion forum. > > ************************************************************************ ******* Forum Note: Use "Reply" to post a response in the discussion forum. ************************************************************************ ******* Forum Note: Use "Reply" to post a response in the discussion forum.
HI, Patrick
Looks remiander can not reside at the same dbspace of a partition.
Otherwise it has following error when creating index....... why ??
create index ds_arch_idx on ds_arch (archive_dt) using btree ;# ^
# 212: Cannot add index.
#
# 101: ISAM error: file is not open.
#
#
Thanks,
Frank
Patrick McD.... wrote:
>The remainder clause doesn't require the "partition" keyword...
>
>fragment by expression
>
>partition part_0001 (cust_cd = '0001' ) in datadbs18 ,
>
>remainder in datadbs18
>
>Patrick McDonough
>
>-----Original Message-----
>From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
>ART KAGEL, ....
>Sent: Monday, June 19, 2006 11:50 AM
>To: ids@iiug.org
>Subject: Re: fragmentation error [6984]
>
>Sorry, old manual version. I want to say that there's a missing set of
>parenthesis somewhere but I can't find it in the new syntax manuals.
>
>Art S. Kagel
>----- Original Message -----
>From: Quman <ids@iiug.org>
>At: 6/19 14:32:50
>
>IDS V10 has partition definition.
>
>On 6/19/06, ART KAGEL, .... <kagel@bloomberg.net> wrote:
>
>
>>Loose the 'partition <partitionname> ' clause. That's not Informix
>>
>>
>syntax.
>
>
>>Read the manual.
>>
>>Art S. Kagel
>>----- Original Message -----
>>From: Quman <ids@iiug.org>
>>At: 6/19 14:18:40
>>
>>I have the script and problems.
>>
>>case 1 ) If I have a remainder partition, it has synatx error,
>>
>>create table "informix".ds_arch
>>(
>>
>>dataset_name varchar(255,44) not null ,
>>
>>archive_site char(10) not null ,
>>
>>path_name varchar(250,50),
>>
>>archive_dt datetime year to second
>>)
>>fragment by expression
>>
>>partition pt1 (archive_dt < datetime(2003-06-01 00:00:00) year to
>>second) in dbdw00 ,
>>
>>partition pt2 ((archive_dt >= datetime(2003-06-01 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2003-08-10 00:00:00) year to
>>second ) ) in dbdw00 ,
>>
>>partition pt3 ((archive_dt >= datetime(2003-08-10 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2004-01-01 00:00:00) year to
>>second ) ) in dbdw00 ,
>>
>>partition pt4 ((archive_dt >= datetime(2004-01-01 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2005-08-10 00:00:00) year to
>>second ) ) in dbdw00 ,
>>
>>partition pt5 ((archive_dt >= datetime(2005-08-10 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2007-01-01 00:00:00) year to
>>second ) ) in dbdw01 ,
>>
>>partition pt6 ((archive_dt >= datetime(2007-01-01 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2008-01-01 00:00:00) year to
>>second ) ) in dbdw01 ,
>>
>>remainder partition pt_r in dbdw01 extent size 4096 next size 4096
>>
>>
>lock
>
>
>>mode row;
>># ^
>># 201: A syntax error has occurred.
>>#
>>
>>create index "informix".ds_arch_idx on "informix".ds_arch (archive_dt)
>>
>>
>
>
>
>>using
>>btree ;
>>create unique index "informix".ds_arch_uidx on "informix".ds_arch
>>
>>(dataset_name,archive_site,archive_dt) using btree ;
>>alter table "informix".ds_arch add constraint primary key
>>
>>
>(dataset_name,
>
>
>>archive_site,archive_dt) constraint "informix".ds_arch_pk
>>
>>;
>>
>>case 2): If delete remainder partition, the table can be created, but
>>Index creation error,
>>
>>create table "informix".ds_arch
>>(
>>
>>dataset_name varchar(255,44) not null ,
>>
>>archive_site char(10) not null ,
>>
>>path_name varchar(250,50),
>>
>>archive_dt datetime year to second
>>)
>>fragment by expression
>>
>>partition pt1 (archive_dt < datetime(2003-06-01 00:00:00) year to
>>second) in dbdw00 ,
>>
>>partition pt2 ((archive_dt >= datetime(2003-06-01 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2003-08-10 00:00:00) year to
>>second ) ) in dbdw00 ,
>>
>>partition pt3 ((archive_dt >= datetime(2003-08-10 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2004-01-01 00:00:00) year to
>>second ) ) in dbdw00 ,
>>
>>partition pt4 ((archive_dt >= datetime(2004-01-01 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2005-08-10 00:00:00) year to
>>second ) ) in dbdw00 ,
>>
>>partition pt5 ((archive_dt >= datetime(2005-08-10 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2007-01-01 00:00:00) year to
>>second ) ) in dbdw01 ,
>>
>>partition pt6 ((archive_dt >= datetime(2007-01-01 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2008-01-01 00:00:00) year to
>>second ) ) in dbdw01 ,
>>
>>remainder in dbdw01 extent size 4096 next size 4096 lock mode row;
>>
>>create index "informix".ds_arch_idx on "informix".ds_arch (archive_dt)
>>
>>
>
>
>
>>using
>>btree ;
>>#
>>^
>># 212: Cannot add index.
>>#
>># 101: ISAM error: file is not open.
>>#
>>#
>>create unique index "informix".ds_arch_uidx on "informix".ds_arch
>>
>>(dataset_name,archive_site,archive_dt) using btree ;
>>alter table "informix".ds_arch add constraint primary key
>>
>>
>(dataset_name,
>
>
>>archive_site,archive_dt) constraint "informix".ds_arch_pk
>>
>>;
>>
>>Thank you very much,
>>Quman
>>
>>
>>
>>
>>
>>
>
>************************************************************************
>*******
>
>
>>Forum Note: Use "Reply" to post a response in the discussion forum.
>>
>>
>>
>>
>>
>>
>
>************************************************************************
>*******
>
>
>>Forum Note: Use "Reply" to post a response in the discussion forum.
>>
>>
>>
>>
>
>************************************************************************
>*******
>Forum Note: Use "Reply" to post a response in the discussion forum.
>
>************************************************************************
>*******
>Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
--
Yunyao "Frank" Qu
Computer Sciences Corporation(CSC)
NOAA/CLASS, (301)817-4696
Remainders can reside in the same dbspace as the other data partitions.
It appears that if a remainder clause is included with partitioning the
table... indexes must include the "in dbspace" clause.
So this should work,
create index ds_arch_idx on ds_arch (archive_dt) using btree in dbdw00;
Patrick
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
Yunyao (Fra....
Sent: Monday, June 19, 2006 1:39 PM
To: ids@iiug.org
Subject: Re: fragmentation error [6986]
HI, Patrick
Looks remiander can not reside at the same dbspace of a partition.
Otherwise it has following error when creating index....... why ??
create index ds_arch_idx on ds_arch (archive_dt) using btree ;# ^
# 212: Cannot add index.
#
# 101: ISAM error: file is not open.
#
#
Thanks,
Frank
Patrick McD.... wrote:
>The remainder clause doesn't require the "partition" keyword...
>
>fragment by expression
>
>partition part_0001 (cust_cd = '0001' ) in datadbs18 ,
>
>remainder in datadbs18
>
>Patrick McDonough
>
>-----Original Message-----
>From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
>ART KAGEL, ....
>Sent: Monday, June 19, 2006 11:50 AM
>To: ids@iiug.org
>Subject: Re: fragmentation error [6984]
>
>Sorry, old manual version. I want to say that there's a missing set of
>parenthesis somewhere but I can't find it in the new syntax manuals.
>
>Art S. Kagel
>----- Original Message -----
>From: Quman <ids@iiug.org>
>At: 6/19 14:32:50
>
>IDS V10 has partition definition.
>
>On 6/19/06, ART KAGEL, .... <kagel@bloomberg.net> wrote:
>
>
>>Loose the 'partition <partitionname> ' clause. That's not Informix
>>
>>
>syntax.
>
>
>>Read the manual.
>>
>>Art S. Kagel
>>----- Original Message -----
>>From: Quman <ids@iiug.org>
>>At: 6/19 14:18:40
>>
>>I have the script and problems.
>>
>>case 1 ) If I have a remainder partition, it has synatx error,
>>
>>create table "informix".ds_arch
>>(
>>
>>dataset_name varchar(255,44) not null ,
>>
>>archive_site char(10) not null ,
>>
>>path_name varchar(250,50),
>>
>>archive_dt datetime year to second
>>)
>>fragment by expression
>>
>>partition pt1 (archive_dt < datetime(2003-06-01 00:00:00) year to
>>second) in dbdw00 ,
>>
>>partition pt2 ((archive_dt >= datetime(2003-06-01 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2003-08-10 00:00:00) year to
>>second ) ) in dbdw00 ,
>>
>>partition pt3 ((archive_dt >= datetime(2003-08-10 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2004-01-01 00:00:00) year to
>>second ) ) in dbdw00 ,
>>
>>partition pt4 ((archive_dt >= datetime(2004-01-01 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2005-08-10 00:00:00) year to
>>second ) ) in dbdw00 ,
>>
>>partition pt5 ((archive_dt >= datetime(2005-08-10 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2007-01-01 00:00:00) year to
>>second ) ) in dbdw01 ,
>>
>>partition pt6 ((archive_dt >= datetime(2007-01-01 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2008-01-01 00:00:00) year to
>>second ) ) in dbdw01 ,
>>
>>remainder partition pt_r in dbdw01 extent size 4096 next size 4096
>>
>>
>lock
>
>
>>mode row;
>># ^
>># 201: A syntax error has occurred.
>>#
>>
>>create index "informix".ds_arch_idx on "informix".ds_arch (archive_dt)
>>
>>
>
>
>
>>using
>>btree ;
>>create unique index "informix".ds_arch_uidx on "informix".ds_arch
>>
>>(dataset_name,archive_site,archive_dt) using btree ;
>>alter table "informix".ds_arch add constraint primary key
>>
>>
>(dataset_name,
>
>
>>archive_site,archive_dt) constraint "informix".ds_arch_pk
>>
>>;
>>
>>case 2): If delete remainder partition, the table can be created, but
>>Index creation error,
>>
>>create table "informix".ds_arch
>>(
>>
>>dataset_name varchar(255,44) not null ,
>>
>>archive_site char(10) not null ,
>>
>>path_name varchar(250,50),
>>
>>archive_dt datetime year to second
>>)
>>fragment by expression
>>
>>partition pt1 (archive_dt < datetime(2003-06-01 00:00:00) year to
>>second) in dbdw00 ,
>>
>>partition pt2 ((archive_dt >= datetime(2003-06-01 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2003-08-10 00:00:00) year to
>>second ) ) in dbdw00 ,
>>
>>partition pt3 ((archive_dt >= datetime(2003-08-10 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2004-01-01 00:00:00) year to
>>second ) ) in dbdw00 ,
>>
>>partition pt4 ((archive_dt >= datetime(2004-01-01 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2005-08-10 00:00:00) year to
>>second ) ) in dbdw00 ,
>>
>>partition pt5 ((archive_dt >= datetime(2005-08-10 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2007-01-01 00:00:00) year to
>>second ) ) in dbdw01 ,
>>
>>partition pt6 ((archive_dt >= datetime(2007-01-01 00:00:00) year to
>>second
>>
>>) AND (archive_dt < datetime(2008-01-01 00:00:00) year to
>>second ) ) in dbdw01 ,
>>
>>remainder in dbdw01 extent size 4096 next size 4096 lock mode row;
>>
>>create index "informix".ds_arch_idx on "informix".ds_arch (archive_dt)
>>
>>
>
>
>
>>using
>>btree ;
>>#
>>^
>># 212: Cannot add index.
>>#
>># 101: ISAM error: file is not open.
>>#
>>#
>>create unique index "informix".ds_arch_uidx on "informix".ds_arch
>>
>>(dataset_name,archive_site,archive_dt) using btree ;
>>alter table "informix".ds_arch add constraint primary key
>>
>>
>(dataset_name,
>
>
>>archive_site,archive_dt) constraint "informix".ds_arch_pk
>>
>>;
>>
>>Thank you very much,
>>Quman
>>
>>
>>
>>
>>
>>
>
>***********************************************************************
*
>*******
>
>
>>Forum Note: Use "Reply" to post a response in the discussion forum.
>>
>>
>>
>>
>>
>>
>
>***********************************************************************
*
>*******
>
>
>>Forum Note: Use "Reply" to post a response in the discussion forum.
>>
>>
>>
>>
>
>***********************************************************************
*
>*******
>Forum Note: Use "Reply" to post a response in the discussion forum.
>
>***********************************************************************
*
>*******
>Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>***********************************************************************
********
> Forum Note: Use "Reply" to post a response
The problem is that if you use,
create index ds_arch_idx on ds_arch (archive_dt) using btree in dbdw00;
The index will NOT be fragmented( i.e., it creates ONR BIG index), that is not
expected.
The users like the both data and index being fragmented.
Frank
Patrick McD.... wrote:
>Remainders can reside in the same dbspace as the other data partitions.
>It appears that if a remainder clause is included with partitioning the
>table... indexes must include the "in dbspace" clause.
>
>So this should work,
>
>create index ds_arch_idx on ds_arch (archive_dt) using btree in dbdw00;>
>Patrick
>
>-----Original Message-----
>From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
>Yunyao (Fra....
>Sent: Monday, June 19, 2006 1:39 PM
>To: ids@iiug.org
>Subject: Re: fragmentation error [6986]
>
>HI, Patrick
>
>Looks remiander can not reside at the same dbspace of a partition.
>Otherwise it has following error when creating index....... why ??
>
>create index ds_arch_idx on ds_arch (archive_dt) using btree ;># ^
># 212: Cannot add index.
>#
># 101: ISAM error: file is not open.
>#
>#
>
>Thanks,
>Frank
>
>Patrick McD.... wrote:
>
>
>
>>The remainder clause doesn't require the "partition" keyword...
>>
>>fragment by expression
>>
>>partition part_0001 (cust_cd = '0001' ) in datadbs18 ,
>>
>>remainder in datadbs18
>>
>>Patrick McDonough
>>
>>-----Original Message-----
>>From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
>>ART KAGEL, ....
>>Sent: Monday, June 19, 2006 11:50 AM
>>To: ids@iiug.org
>>Subject: Re: fragmentation error [6984]
>>
>>Sorry, old manual version. I want to say that there's a missing set of
>>parenthesis somewhere but I can't find it in the new syntax manuals.
>>
>>Art S. Kagel
>>----- Original Message -----
>>From: Quman <ids@iiug.org>
>>At: 6/19 14:32:50
>>
>>IDS V10 has partition definition.
>>
>>On 6/19/06, ART KAGEL, .... <kagel@bloomberg.net> wrote:
>>
>>
>>
>>
>>>Loose the 'partition <partitionname> ' clause. That's not Informix
>>>
>>>
>>>
>>>
>>syntax.
>>
>>
>>
>>
>>>Read the manual.
>>>
>>>Art S. Kagel
>>>----- Original Message -----
>>>From: Quman <ids@iiug.org>
>>>At: 6/19 14:18:40
>>>
>>>I have the script and problems.
>>>
>>>case 1 ) If I have a remainder partition, it has synatx error,
>>>
>>>create table "informix".ds_arch
>>>(
>>>
>>>dataset_name varchar(255,44) not null ,
>>>
>>>archive_site char(10) not null ,
>>>
>>>path_name varchar(250,50),
>>>
>>>archive_dt datetime year to second
>>>)
>>>fragment by expression
>>>
>>>partition pt1 (archive_dt < datetime(2003-06-01 00:00:00) year to
>>>second) in dbdw00 ,
>>>
>>>partition pt2 ((archive_dt >= datetime(2003-06-01 00:00:00) year to
>>>second
>>>
>>>) AND (archive_dt < datetime(2003-08-10 00:00:00) year to
>>>second ) ) in dbdw00 ,
>>>
>>>partition pt3 ((archive_dt >= datetime(2003-08-10 00:00:00) year to
>>>second
>>>
>>>) AND (archive_dt < datetime(2004-01-01 00:00:00) year to
>>>second ) ) in dbdw00 ,
>>>
>>>partition pt4 ((archive_dt >= datetime(2004-01-01 00:00:00) year to
>>>second
>>>
>>>) AND (archive_dt < datetime(2005-08-10 00:00:00) year to
>>>second ) ) in dbdw00 ,
>>>
>>>partition pt5 ((archive_dt >= datetime(2005-08-10 00:00:00) year to
>>>second
>>>
>>>) AND (archive_dt < datetime(2007-01-01 00:00:00) year to
>>>second ) ) in dbdw01 ,
>>>
>>>partition pt6 ((archive_dt >= datetime(2007-01-01 00:00:00) year to
>>>second
>>>
>>>) AND (archive_dt < datetime(2008-01-01 00:00:00) year to
>>>second ) ) in dbdw01 ,
>>>
>>>remainder partition pt_r in dbdw01 extent size 4096 next size 4096
>>>
>>>
>>>
>>>
>>lock
>>
>>
>>
>>
>>>mode row;
>>># ^
>>># 201: A syntax error has occurred.
>>>#
>>>
>>>create index "informix".ds_arch_idx on "informix".ds_arch (archive_dt)
>>>
>>>
>
>
>
>>>
>>>
>>
>>
>>
>>>using
>>>btree ;
>>>create unique index "informix".ds_arch_uidx on "informix".ds_arch
>>>
>>>(dataset_name,archive_site,archive_dt) using btree ;
>>>alter table "informix".ds_arch add constraint primary key
>>>
>>>
>>>
>>>
>>(dataset_name,
>>
>>
>>
>>
>>>archive_site,archive_dt) constraint "informix".ds_arch_pk
>>>
>>>;
>>>
>>>case 2): If delete remainder partition, the table can be created, but
>>>Index creation error,
>>>
>>>create table "informix".ds_arch
>>>(
>>>
>>>dataset_name varchar(255,44) not null ,
>>>
>>>archive_site char(10) not null ,
>>>
>>>path_name varchar(250,50),
>>>
>>>archive_dt datetime year to second
>>>)
>>>fragment by expression
>>>
>>>partition pt1 (archive_dt < datetime(2003-06-01 00:00:00) year to
>>>second) in dbdw00 ,
>>>
>>>partition pt2 ((archive_dt >= datetime(2003-06-01 00:00:00) year to
>>>second
>>>
>>>) AND (archive_dt < datetime(2003-08-10 00:00:00) year to
>>>second ) ) in dbdw00 ,
>>>
>>>partition pt3 ((archive_dt >= datetime(2003-08-10 00:00:00) year to
>>>second
>>>
>>>) AND (archive_dt < datetime(2004-01-01 00:00:00) year to
>>>second ) ) in dbdw00 ,
>>>
>>>partition pt4 ((archive_dt >= datetime(2004-01-01 00:00:00) year to
>>>second
>>>
>>>) AND (archive_dt < datetime(2005-08-10 00:00:00) year to
>>>second ) ) in dbdw00 ,
>>>
>>>partition pt5 ((archive_dt >= datetime(2005-08-10 00:00:00) year to
>>>second
>>>
>>>) AND (archive_dt < datetime(2007-01-01 00:00:00) year to
>>>second ) ) in dbdw01 ,
>>>
>>>partition pt6 ((archive_dt >= datetime(2007-01-01 00:00:00) year to
>>>second
>>>
>>>) AND (archive_dt < datetime(2008-01-01 00:00:00) year to
>>>second ) ) in dbdw01 ,
>>>
>>>remainder in dbdw01 extent size 4096 next size 4096 lock mode row;
>>>
>>>create index "informix".ds_arch_idx on "informix".ds_arch (archive_dt)
>>>
>>>
>
>
>
>>>
>>>
>>
>>
>>
>>>using
>>>btree ;
>>>#
>>>^
>>># 212: Cannot add index.
>>>#
>>># 101: ISAM error: file is not open.
>>>#
>>>#
>>>create unique index "informix".ds_arch_uidx on "informix".ds_arch
>>>
>>>(dataset_name,archive_site,archive_dt) using btree ;
>>>alter table "informix".ds_arch add constraint primary key
>>>
>>>
>>>
>>>
>>(dataset_name,
>>
>>
>>
>>
>>>archive_site,archive_dt) constraint "informix".ds_arch_pk
>>>
>>>;
>>>
>>>Thank you very much,
>>>Quman
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>***********************************************************************
>>
>>
>*
>
>
>>*******
>>
>>
>>
>>
>>>Forum Note: Use "R