Unix Technical Forum

DDL or DML scripts AND enable vs create index

This is a discussion on DDL or DML scripts AND enable vs create index within the Informix forums, part of the Database Server Software category; --> 1. I just want to know if informix store create index or alter table type of scripts in some ...


Go Back   Unix Technical Forum > Database Server Software > Informix

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 03:46 PM
mohitanchlia@gmail.com
 
Posts: n/a
Default DDL or DML scripts AND enable vs create index

1. I just want to know if informix store create index or alter table
type of scripts in some table. I am assuming that informix stores them
in tables otherwise how would dbschema get these ?

Could you please let me know.

2. Also which is better enable indexes or create indexes. Does update
stats work better on create indexes ?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 03:48 PM
Fernando Nunes
 
Posts: n/a
Default Re: DDL or DML scripts AND enable vs create index

mohitanchlia@gmail.com wrote:
> 1. I just want to know if informix store create index or alter table
> type of scripts in some table. I am assuming that informix stores them
> in tables otherwise how would dbschema get these ?
>
> Could you please let me know.
>
> 2. Also which is better enable indexes or create indexes. Does update
> stats work better on create indexes ?
>


Enabling an index is similar to create a new one.
Disable indexes have the advantage of appearing in the schema... But to be
honest I don't find them very useful...

Update statistics may or may not be influenced by this... To be honest I don't
know, but I assume that LOW stats are not collected for disabled indexes... It
simply doesn't make sense, since these indexes are never used...

If I didn't catch your idea completely please insist.
Regards,


--
Fernando Nunes
Portugal

http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 03:48 PM
Rajib Sarkar
 
Posts: n/a
Default Re: DDL or DML scripts AND enable vs create index

mohitanchlia@gmail.com wrote:
> 1. I just want to know if informix store create index or alter table
> type of scripts in some table. I am assuming that informix stores them
> in tables otherwise how would dbschema get these ?
>
> Could you please let me know.
>
> 2. Also which is better enable indexes or create indexes. Does update
> stats work better on create indexes ?
>


1. As for any RDBMS, catalog tables serve the purpose. So, tables such as
systables, store the table information for the database, syscolumns store
the
column info for each table, sysindexes store indexes for each table,
sysconstraints constraints .. and so on and so forth.

2. I'm not getting this ..? if you don't create the indexes how's it going
to be disabled or enabled ? Update stats work with or without indexes.. if
you have
indexes on tables then it'll have better information on the column
values and can make the access faster by choosing a plan which is least
costly if its got
good information.

HTH

Rajib Sarkar
Sr. Technical Analyst
DB2 RPD Team ( Level 3 Support )



HTH
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-20-2008, 03:49 PM
mohitanchlia@gmail.com
 
Posts: n/a
Default Re: DDL or DML scripts AND enable vs create index

Thanks for the info. I've read some other comments and everybody
suggests that dropping and creating indexes are better than disabling
them, but haven't got explanation as to why is it like that. Why is
creating index better than enabling them - is there something
different between them that occurs underneath.
On Jun 19, 2:49 pm, Fernando Nunes <s...@domus.online.pt> wrote:
> mohitanch...@gmail.com wrote:
> > 1. I just want to know if informix storecreateindexor alter table
> > type of scripts in some table. I am assuming that informix stores them
> > in tables otherwise how would dbschema get these ?

>
> > Could you please let me know.

>
> > 2. Also which is betterenableindexes orcreateindexes. Does update
> > stats work better oncreateindexes ?

>
> Enabling anindexis similar tocreatea new one.
> Disable indexes have the advantage of appearing in the schema... But to be
> honest I don't find them very useful...
>
> Update statistics may or may not be influenced by this... To be honest I don't
> know, but I assume that LOW stats are not collected for disabled indexes... It
> simply doesn't make sense, since these indexes are never used...
>
> If I didn't catch your idea completely please insist.
> Regards,
>
> --
> Fernando Nunes
> Portugal
>
> http://informix-technology.blogspot.com
> My email works... but I don't check it frequently...



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-20-2008, 03:49 PM
Art S. Kagel
 
Posts: n/a
Default Re: DDL or DML scripts AND enable vs create index

On Jun 20, 11:48 am, mohitanch...@gmail.com wrote:
> Thanks for the info. I've read some other comments and everybody
> suggests that dropping and creating indexes are better than disabling
> them, but haven't got explanation as to why is it like that. Why is
> creating index better than enabling them - is there something
> different between them that occurs underneath.
> On Jun 19, 2:49 pm, Fernando Nunes <s...@domus.online.pt> wrote:
>
> > mohitanch...@gmail.com wrote:
> > > 1. I just want to know if informix storecreateindexor alter table
> > > type of scripts in some table. I am assuming that informix stores them
> > > in tables otherwise how would dbschema get these ?

>
> > > Could you please let me know.

>
> > > 2. Also which is betterenableindexes orcreateindexes. Does update
> > > stats work better oncreateindexes ?

>
> > Enabling anindexis similar tocreatea new one.
> > Disable indexes have the advantage of appearing in the schema... But to be
> > honest I don't find them very useful...

>
> > Update statistics may or may not be influenced by this... To be honest I don't
> > know, but I assume that LOW stats are not collected for disabled indexes... It
> > simply doesn't make sense, since these indexes are never used...


One question: If the indexes already exist, so that you COULD disable,
then reenable them, why do you need to do that?

Are your trying to determine the best way to reorganize an index?
You are aware that you are using IDS which is quite capable of
maintaining its indexes without the neccessity of reorganizing them,
almost EVER? The btree cleaner threads maintain the indexes in
optimal condition most of the time. The only time that a reorg MIGHT
be needed is immediately after a huge delete or update of indexed
columns when you cannot wait for the cleaners to catch up. Otherwise,
just chill.

I don't work with them enough to know, but are Orable, DB2, SQL
Server, and Sybase so bad at online index maintenance that DBAs spend
valuable time reorging indexes constantly?

Art S. Kagel


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 10:28 PM.


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