Unix Technical Forum

Rebuild indexes

This is a discussion on Rebuild indexes within the Informix forums, part of the Database Server Software category; --> What is the method of rebuilding indexes in 9.4? Could you possible include some systax? Thanks in advance...


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, 11:49 AM
Hendrick
 
Posts: n/a
Default Rebuild indexes

What is the method of rebuilding indexes in 9.4? Could you possible
include some systax?

Thanks in advance

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 11:50 AM
Michael Schmid
 
Posts: n/a
Default Re: Rebuild indexes

There are more than this option i use:

ALTER FRAGMENT ON INDEX the_index_name INIT IN dbspace_name;

Other people prefer the DROP/CREATE procedure to rebuild, but that can
get nasty when you constraints etc.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 11:50 AM
Hendrick
 
Posts: n/a
Default Re: Rebuild indexes

Thanks for your response. Do I do this for every index? There is three
indexes within the same table. Also how do I go about updateing
statistics on that table?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-20-2008, 11:50 AM
Michael Schmid
 
Posts: n/a
Default Re: Rebuild indexes

Yes, you have to do this for every index you want to rebuild.
Consider, that you will have a downtime for the table on which the index
is. (The Rebuild places an exclusive table lock on that table.)
And you need enough spaces in your temp dbspace.
So, to find out how much time and temp space you need, you should test
the index rebuild on your test system, which should match as much as
possible (data volume etc.) the production system.

To get the statistics of a table, i use:

UPDATE STATISTICS MEDIUM FOR TABLE table_name;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-20-2008, 11:52 AM
Art S. Kagel
 
Posts: n/a
Default Re: Rebuild indexes

Hendrick wrote:
> Thanks for your response. Do I do this for every index? There is three
> indexes within the same table. Also how do I go about updateing
> statistics on that table?
>


See the Performance Guide manual and John Miller III's paper about the
latest optimizations inside later IDS versions and how to take advantage of
them to compute statistics faster:

http://www.ibm.com/developerworks/db...203miller.html

Or just get my dostats utility in the package utils2_ak available from the
IIUG Software Repository (new release dated 3/27/2006 will be posted
shortly, I uploaded it last week and Peter's working on it).

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 11:19 AM.


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