Subject Re: [ib-support] How does one deactivate indicies during a massive update operation?
Author Luciano Sparacino
A newbie's question:

if you deactivate an index for a massive insert operation is the index deactivate for all transactions on the ibserver? and once you re-activate the index does the deactivation and re-activation of it affect the data on those tables (just like in a plain table as paradox, for example where you would need to re-index)?

thanks!
----- Original Message -----
From: Kaputnik
To: ib-support@yahoogroups.com
Sent: Thursday, January 03, 2002 7:19 PM
Subject: RE: [ib-support] How does one deactivate indicies during a massive update operation?


a select similar to this one:

select RDB$INDEX_NAME from RDB$INDICES
where (RDB$RELATION_NAME=:table_name)
and ((RDB$INDEX_INACTIVE=0) or (RDB$INDEX_INACTIVE is null))
and (not RDB$INDEX_NAME like 'RDB$%')
and (RDB$FOREIGN_KEY is null)

and then loop through the result set and issue ALTER INDEX :table_name
:activestate
active state is either ACTIVE or INACTIVE

this run through a DSQL component or so will do the trick.
As I've perhaps used IB_Console the last time a year ago or so (I hate this
damn thing) I can't help with this, but IBWorkbench from Martijn Tonies
(http://www.ibworkbench.com) and also the other tools will let you
(dis)activate all indizes of a table pretty quickly with a mouse-click.
Also check out IB_SQL as IB_COnsole Replacement. It does (almost) everything
IB_COnsole does, but then it does much much more other helpfull stuff.
Check out http://www.ibobjects.com for the latest version of IB_SQL

CU,

Nick Josipovic

CRM Administration
BIT-Institute
Prof. Dr. Franz Steffens
Schloss
68163 Mannheim
Germany
Phone: ++49 621 181-1621
Fax: ++49 621 181-1618
mailto:nick.josipovic@...



> -----Original Message-----
> From: M Tuttle [mailto:miket@...]
> Sent: Thursday, January 03, 2002 10:54 PM
> To: IB Support (Yahoo Group)
> Subject: [ib-support] How does one deactivate indicies during a massive
> update operation?
>
>
> Greetings All,
>
> Still relatively new to Interbase.
>
> How does one disable all indexes on a table before doing a
> massive update or
> delete operation? I understand that this would greatly speed the
> operation
> up.
>
> How is it done in IBConsole?
>
> How is it done programmatically?
>
> If the indexes are disabled during a massive update and then they are
> enabled after the update, do I need to do anything else to sync the index
> with the data? What about after a massive delete operation?
>
> Thanks All,
>
> Mike
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


Yahoo! Groups Sponsor
ADVERTISEMENT




To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



[Non-text portions of this message have been removed]