RE: is this a problem?
Posted in 2005
Malc,
Well the table is not fragmented that I can tell. I did think of that
but I haven't fragmented any tables. I'm not sure what systabperm is,
maybe a carryover from an earlier version as this database has been
around since 1997 give or take a year.
Here is the dbschema for gu_prereg_pay:
DBSCHEMA Schema Utility INFORMIX-SQL Version 9.40.HC3
Copyright (C) Informix Software, Inc., 1984-1997
Software Serial Number AAA#B000000
{ TABLE "informix".gu_prereg_pay row size = 122 number of columns = 9
index size
= 27 }
create table "informix".gu_prereg_pay
(
pay_key serial not null ,
mstr_serial_key integer,
payment_type char(12),
card_key integer,
check_number integer,
aid_code char(4)
default '',
payment_txt char(72),
payment_amt money(16,2)
default 0,
remitted_amt money(16,2)
default 0
) extent size 1440 next size 288 lock mode row;
revoke all on "informix".gu_prereg_pay from "public";
create index "informix".gu_prereg_crdkey on "informix".gu_prereg_pay
(card_key) using btree in dbs0 ;
create unique index "informix".gu_prereg_pay on "informix".gu_prereg_pay
(pay_key) using btree in dbs0 ;
create index "informix".gu_prereg_paylink on "informix".gu_prereg_pay
(mstr_serial_key) using btree in dbs0 ;
create trigger "informix".gu_prereg_pai insert on
"informix".gu_prereg_pay
referencing new as n
for each row
(
insert into cars_audit:"informix".gu_prereg_pay
(audit_timestamp,
audit_username,audit_event,pay_key,mstr_serial_key,payment_type,card_key
,
check_number,aid_code,payment_txt,payment_amt,remitted_amt) values
(CURRENT year to fraction(3) ,USER ,'I ' ,n.pay_key
,n.mstr_serial_key
,n.payment_type ,n.card_key ,n.check_number ,n.aid_code
,n.payment_txt
,n.payment_amt ,n.remitted_amt ));
create trigger "informix".gu_prereg_pau update on
"informix".gu_prereg_pay
referencing old as o new as n
for each row
when ((((((((((((((((((((((((((((o.aid_code != n.aid_code
) OR ((o.aid_code IS NULL ) AND (n.aid_code IS NOT NULL ) ) ) OR
((o.aid_code IS NOT NULL ) AND (n.aid_code IS NULL ) ) ) OR
(o.card_key
!= n.card_key ) ) OR ((o.card_key IS NULL ) AND (n.card_key IS NOT
NULL ) ) ) OR ((o.card_key IS NOT NULL ) AND (n.card_key IS NULL
) ) ) OR (o.check_number != n.check_number ) ) OR ((o.check_number
IS NULL ) AND (n.check_number IS NOT NULL ) ) ) OR ((o.check_number
IS NOT NULL ) AND (n.check_number IS NULL ) ) ) OR
(o.mstr_serial_key
!= n.mstr_serial_key ) ) OR ((o.mstr_serial_key IS NULL ) AND
(n.mstr_serial_key
IS NOT NULL ) ) ) OR ((o.mstr_serial_key IS NOT NULL ) AND
(n.mstr_serial_key
IS NULL ) ) ) OR (o.pay_key != n.pay_key ) ) OR ((o.pay_key IS NULL
) AND (n.pay_key IS NOT NULL ) ) ) OR ((o.pay_key IS NOT NULL ) AND
(n.pay_key IS NULL ) ) ) OR (o.payment_amt != n.payment_amt ) ) OR
((o.payment_amt IS NULL ) AND (n.payment_amt IS NOT NULL ) ) ) OR
((o.payment_amt IS NOT NULL ) AND (n.payment_amt IS NULL ) ) ) OR
(o.payment_txt != n.payment_txt ) ) OR ((o.payment_txt IS NULL )
AND (n.payment_txt IS NOT NULL ) ) ) OR ((o.payment_txt IS NOT NULL
) AND (n.payment_txt IS NULL ) ) ) OR (o.payment_type !=
n.payment_type
) ) OR ((o.payment_type IS NULL ) AND (n.payment_type IS NOT NULL
) ) ) OR ((o.payment_type IS NOT NULL ) AND (n.payment_type IS NULL
) ) ) OR (o.remitted_amt != n.remitted_amt ) ) OR ((o.remitted_amt
IS NULL ) AND (n.remitted_amt IS NOT NULL ) ) ) OR ((o.remitted_amt
IS NOT NULL ) AND (n.remitted_amt IS NULL ) ) ) )
(
insert into cars_audit:"informix".gu_prereg_pay
(audit_timestamp,
audit_username,audit_event,pay_key,mstr_serial_key,payment_type,card_key
,
check_number,aid_code,payment_txt,payment_amt,remitted_amt) values
(CURRENT
year to fraction(3) ,USER ,'BU' ,o.pay_key ,o.mstr_serial_key
,o.payment_type
,o.card_key ,o.check_number ,o.aid_code ,o.payment_txt
,o.payment_amt
,o.remitted_amt ),
insert into cars_audit:"informix".gu_prereg_pay
(audit_timestamp,
audit_username,audit_event,pay_key,mstr_serial_key,payment_type,card_key
,
check_number,aid_code,payment_txt,payment_amt,remitted_amt) values
(CURRENT
year to fraction(3) ,USER ,'AU' ,n.pay_key ,n.mstr_serial_key
,n.payment_type
,n.card_key ,n.check_number ,n.aid_code ,n.payment_txt
,n.payment_amt
,n.remitted_amt ));
create trigger "informix".gu_prereg_pad delete on
"informix".gu_prereg_pay
referencing old as o
for each row
(
insert into cars_audit:"informix".gu_prereg_pay
(audit_timestamp,
audit_username,audit_event,pay_key,mstr_serial_key,payment_type,card_key
,
check_number,aid_code,payment_txt,payment_amt,remitted_amt) values
(CURRENT year to fraction(3) ,USER ,'D ' ,o.pay_key
,o.mstr_serial_key
,o.payment_type ,o.card_key ,o.check_number ,o.aid_code
,o.payment_txt
,o.payment_amt ,o.remitted_amt ));
-----Original Message-----
From: owner-informix-list@iiug.org [mailto:owner-informix-list@iiug.org]
On Behalf Of Malc P
Sent: Tuesday, April 26, 2005 4:42 AM
To: informix-list@iiug.org
Subject: is this a problem?
This will also happen if there is fragmentation of the table into two or
more dbspaces - each fragment has its own partnum. Check in the
sysfragments table in the cars database, which will also give you the
fragmentation expression. Or use dbschema -d cars -t gu_prereg_pay -ss
(or systabperm - which AFAIK is not a system catalog table unless it's
an earlier version or possibly SE). Cheers Malc
sending to informix-list