dbTalk Databases Forums  

Flaw in dbschema

comp.databases.informix comp.databases.informix


Discuss Flaw in dbschema in the comp.databases.informix forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mohitanchlia@gmail.com
 
Posts: n/a

Default Flaw in dbschema - 06-18-2007 , 07:25 PM






I don't know why but when I count number of indexes generated by
dbschema for specific "database and owner" is different than the
number I get when I look at sysindexes table for specific "database
and owner".

All I can tell is they are 3 idexes off and all 3 indexes name that
wasn't generated by dbschema starts with number.

Could you please tell me why or how can I get these indexes.


Reply With Quote
  #2  
Old   
Jack Parker
 
Posts: n/a

Default RE: Flaw in dbschema - 06-18-2007 , 07:55 PM







Generated indices for constraints are numbered and will not show up in
dbschema output as 'create index'. Instead they will show up as
constraints. Genrally their names start with space, followed by tabid,
underscore, and I forget the rest.

j.
-----Original Message-----
From: informix-list-bounces (AT) iiug (DOT) org
[mailto:informix-list-bounces (AT) iiug (DOT) org]On Behalf Of
mohitanchlia (AT) gmail (DOT) com
Sent: Monday, June 18, 2007 8:26 PM
To: informix-list (AT) iiug (DOT) org
Subject: Flaw in dbschema


I don't know why but when I count number of indexes generated by
dbschema for specific "database and owner" is different than the
number I get when I look at sysindexes table for specific "database
and owner".

All I can tell is they are 3 idexes off and all 3 indexes name that
wasn't generated by dbschema starts with number.

Could you please tell me why or how can I get these indexes.

_______________________________________________
Informix-list mailing list
Informix-list (AT) iiug (DOT) org
http://www.iiug.org/mailman/listinfo/informix-list


Reply With Quote
  #3  
Old   
mohitanchlia@gmail.com
 
Posts: n/a

Default Re: Flaw in dbschema - 06-19-2007 , 09:46 AM



I think I didn't explain properly,

when I do "select count(*) from sysindexes where owner = "abcd" gives
higher count than
when I do dbschema -d DB and take count for indexes of owner abcd.
Those index names that don't show up are not part of dbschema starts
with numeric. Is there a flaw or is there a way to get it using
dbschema ?

On Jun 18, 5:55 pm, "Jack Parker" <jack.park... (AT) verizon (DOT) net> wrote:
Quote:
Generated indices for constraints are numbered and will not show up indbschemaoutput as 'create index'. Instead they will show up as
constraints. Genrally their names start with space, followed by tabid,
underscore, and I forget the rest.

j.



-----Original Message-----
From: informix-list-boun... (AT) iiug (DOT) org
[mailto:informix-list-boun... (AT) iiug (DOT) org]On Behalf Of
mohitanch... (AT) gmail (DOT) com
Sent: Monday, June 18, 2007 8:26 PM
To: informix-l... (AT) iiug (DOT) org
Subject:Flawindbschema

I don't know why but when I count number of indexes generated bydbschemafor specific "database and owner" is different than the
number I get when I look at sysindexes table for specific "database
and owner".

All I can tell is they are 3 idexes off and all 3 indexes name that
wasn't generated bydbschemastarts with number.

Could you please tell me why or how can I get these indexes.

_______________________________________________
Informix-list mailing list
Informix-l... (AT) iiug (DOT) orghttp://www.iiug.org/mailman/listinfo/informix-list- Hide quoted text -

- Show quoted text -



Reply With Quote
  #4  
Old   
Art S. Kagel
 
Posts: n/a

Default Re: Flaw in dbschema - 06-19-2007 , 11:04 AM



On Jun 19, 10:46 am, mohitanch... (AT) gmail (DOT) com wrote:
Quote:
I think I didn't explain properly,

when I do "select count(*) from sysindexes where owner = "abcd" gives
higher count than
when I do dbschema -d DB and take count for indexes of owner abcd.
Those index names that don't show up are not part of dbschema starts
with numeric. Is there a flaw or is there a way to get it using
dbschema ?

On Jun 18, 5:55 pm, "Jack Parker" <jack.park... (AT) verizon (DOT) net> wrote:

Generated indices for constraints are numbered and will not show up indbschemaoutput as 'create index'. Instead they will show up as
constraints. Genrally their names start with space, followed by tabid,
underscore, and I forget the rest.

j.

-----Original Message-----
From: informix-list-boun... (AT) iiug (DOT) org
[mailto:informix-list-boun... (AT) iiug (DOT) org]On Behalf Of
mohitanch... (AT) gmail (DOT) com
Sent: Monday, June 18, 2007 8:26 PM
To: informix-l... (AT) iiug (DOT) org
Subject:Flawindbschema

I don't know why but when I count number of indexes generated bydbschemafor specific "database and owner" is different than the
number I get when I look at sysindexes table for specific "database
and owner".

All I can tell is they are 3 idexes off and all 3 indexes name that
wasn't generated bydbschemastarts with number.

Could you please tell me why or how can I get these indexes.
Did you READ Jack's answer? Dbschema will NOT report on implicitly
created indexes that were created as the result of creating
a primary key, foreign key, or unique constraint. If you just want to
have the counts match add "AND idxname NOT MATCHES ' *'"
to your catalog query. If you want to know what those indexes are you
have two choices:

1) Look at the constraints on the table in dbschema ... -ss and any
constraints that do not have a matching index explicitly created
DO have an implicit index on the same columns as the constraint,
UNIQUE for primary key and unique constraints, non-unique for
foreign key constraints.

2) Get my dbschema replacement utility, myschema, which DOES print out
the definitions of implied indexes, giving them names
that are readable (ie do not start with an embedded space). Myschema
is included in the package utils2_ak available for download
from the IIUG Software Repository.

Art S. Kagel




Reply With Quote
  #5  
Old   
mohitanchlia@gmail.com
 
Posts: n/a

Default Re: Flaw in dbschema - 06-20-2007 , 10:45 AM



Thanks guys. I understand now. I didn't realise that those were
internally created by informix.
On Jun 19, 9:04 am, "Art S. Kagel" <art.ka... (AT) gmail (DOT) com> wrote:
Quote:
On Jun 19, 10:46 am, mohitanch... (AT) gmail (DOT) com wrote:





I think I didn't explain properly,

when I do "select count(*) from sysindexes where owner = "abcd" gives
higher count than
when I dodbschema-d DB and take count for indexes of owner abcd.
Those index names that don't show up are not part ofdbschemastarts
with numeric. Is there a flaw or is there a way to get it using
dbschema?

On Jun 18, 5:55 pm, "Jack Parker" <jack.park... (AT) verizon (DOT) net> wrote:

Generated indices for constraints are numbered and will not show up indbschemaoutput as 'create index'. Instead they will show up as
constraints. Genrally their names start with space, followed by tabid,
underscore, and I forget the rest.

j.

-----Original Message-----
From: informix-list-boun... (AT) iiug (DOT) org
[mailto:informix-list-boun... (AT) iiug (DOT) org]On Behalf Of
mohitanch... (AT) gmail (DOT) com
Sent: Monday, June 18, 2007 8:26 PM
To: informix-l... (AT) iiug (DOT) org
Subject:Flawindbschema

I don't know why but when I count number of indexes generated bydbschemafor specific "database and owner" is different than the
number I get when I look at sysindexes table for specific "database
and owner".

All I can tell is they are 3 idexes off and all 3 indexes name that
wasn't generated bydbschemastarts with number.

Could you please tell me why or how can I get these indexes.

Did you READ Jack's answer? Dbschemawill NOT report on implicitly
created indexes that were created as the result of creating
a primary key, foreign key, or unique constraint. If you just want to
have the counts match add "AND idxname NOT MATCHES ' *'"
to your catalog query. If you want to know what those indexes are you
have two choices:

1) Look at the constraints on the table indbschema... -ss and any
constraints that do not have a matching index explicitly created
DO have an implicit index on the same columns as the constraint,
UNIQUE for primary key and unique constraints, non-unique for
foreign key constraints.

2) Get mydbschemareplacement utility, myschema, which DOES print out
the definitions of implied indexes, giving them names
that are readable (ie do not start with an embedded space). Myschema
is included in the package utils2_ak available for download
from the IIUG Software Repository.

Art S. Kagel- Hide quoted text -

- Show quoted text -



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.