Unix Technical Forum

Flaw in dbschema

This is a discussion on Flaw in dbschema within the Informix forums, part of the Database Server Software category; --> I don't know why but when I count number of indexes generated by dbschema for specific "database and owner" ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 04:47 PM
mohitanchlia@gmail.com
 
Posts: n/a
Default 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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 04:48 PM
mohitanchlia@gmail.com
 
Posts: n/a
Default Re: Flaw in dbschema

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...@verizon.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...@iiug.org
> [mailto:informix-list-boun...@iiug.org]On Behalf Of
> mohitanch...@gmail.com
> Sent: Monday, June 18, 2007 8:26 PM
> To: informix-l...@iiug.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...@iiug.orghttp://www.iiug.org/mailman/listinfo/informix-list- Hide quoted text -
>
> - Show quoted text -



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 04:48 PM
Art S. Kagel
 
Posts: n/a
Default Re: Flaw in dbschema

On Jun 19, 10:46 am, mohitanch...@gmail.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 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...@verizon.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...@iiug.org
> > [mailto:informix-list-boun...@iiug.org]On Behalf Of
> > mohitanch...@gmail.com
> > Sent: Monday, June 18, 2007 8:26 PM
> > To: informix-l...@iiug.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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-20-2008, 04:49 PM
mohitanchlia@gmail.com
 
Posts: n/a
Default Re: Flaw in dbschema

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...@gmail.com> wrote:
> On Jun 19, 10:46 am, mohitanch...@gmail.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...@verizon.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...@iiug.org
> > > [mailto:informix-list-boun...@iiug.org]On Behalf Of
> > > mohitanch...@gmail.com
> > > Sent: Monday, June 18, 2007 8:26 PM
> > > To: informix-l...@iiug.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 -



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:18 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com