dbTalk Databases Forums  

DDL or DML scripts AND enable vs create index

comp.databases.informix comp.databases.informix


Discuss DDL or DML scripts AND enable vs create index in the comp.databases.informix forum.



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

Default DDL or DML scripts AND enable vs create index - 06-17-2007 , 02:35 PM






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 ?


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

Default RE: DDL or DML scripts AND enable vs create index - 06-17-2007 , 03:13 PM







Here's a little article that should answer your first question.

http://www.ibm.com/developerworks/db...echarticle/030
5parker/0305parker.html

I'm not touching the second one.

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: Sunday, June 17, 2007 3:35 PM
To: informix-list (AT) iiug (DOT) org
Subject: 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 ?

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


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

Default RE: DDL or DML scripts AND enable vs create index - 06-18-2007 , 12:06 AM



If you need more detail, try the the create_idx function in dbdiff2. It
gets all of it's information from the system catalogues - just as dbschema
does.

http://www.iiug.org/software/archive/dbdiff2

j.
-----Original Message-----
From: Mohit Anchlia [mailto:mohitanchlia (AT) gmail (DOT) com]
Sent: Sunday, June 17, 2007 11:46 PM
To: Jack Parker; informix-list (AT) iiug (DOT) org
Subject: Re: DDL or DML scripts AND enable vs create index


But how do I get the complete index's script. For eg: dbschema gives "create
index asssa" script, how do I get this from the database directly. I see
that you could retrieve procedure for sysprocbody table, but how do I get
the indexes.

Also if somebody could throw some light on if creating indexes are better
than enabling indexes. Also does update stats work better with creating
indexes or when indexes are enabled.



On 6/17/07, Jack Parker <jack.parker4 (AT) verizon (DOT) net> wrote:

Here's a little article that should answer your first question.


http://www.ibm.com/developerworks/db...echarticle/030
5parker/0305parker.html

I'm not touching the second one.

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: Sunday, June 17, 2007 3:35 PM
To: informix-list (AT) iiug (DOT) org
Subject: 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 ?

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




Reply With Quote
  #4  
Old   
Fernando Nunes
 
Posts: n/a

Default Re: DDL or DML scripts AND enable vs create index - 06-19-2007 , 04:49 PM



mohitanchlia (AT) gmail (DOT) com wrote:
Quote:
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...


Reply With Quote
  #5  
Old   
Rajib Sarkar
 
Posts: n/a

Default Re: DDL or DML scripts AND enable vs create index - 06-19-2007 , 05:13 PM



mohitanchlia (AT) gmail (DOT) com wrote:
Quote:
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


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

Default Re: DDL or DML scripts AND enable vs create index - 06-20-2007 , 10:48 AM



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... (AT) domus (DOT) online.pt> wrote:
Quote:
mohitanch... (AT) gmail (DOT) 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...



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

Default Re: DDL or DML scripts AND enable vs create index - 06-20-2007 , 04:12 PM



On Jun 20, 11:48 am, mohitanch... (AT) gmail (DOT) com wrote:
Quote:
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... (AT) domus (DOT) online.pt> wrote:

mohitanch... (AT) gmail (DOT) 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




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.