🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #702

How to Rebuild all Index

#702
From: Andrea [Work]
Date: Thu, 26 Jul 2007 10:35
20 lines
1829 bytes
Hi All,
to rebuild an index i'm using:
ALTER INDEX "NAME" SET INACTIVE;
ALTER INDEX "NAME" SET ACTIVE;

but i would like to rebuil all Index in my DB's with one command.
I'm trying with this command and seems work correct:
(I don't want PK e FK indexes)

UPDATE RDB$INDICES SET RDB$INDEX_INACTIVE=1
WHERE COALESCE(RDB$UNIQUE_FLAG,0)<>1 AND RDB$FOREIGN_KEY IS NULL AND
RDB$SYSTEM_FLAG IS NULL;

UPDATE RDB$INDICES SET RDB$INDEX_INACTIVE=NULL
WHERE COALESCE(RDB$UNIQUE_FLAG,0)<>1 AND RDB$FOREIGN_KEY IS NULL AND
RDB$SYSTEM_FLAG IS NULL;

Could i have problem with direct access to RDB$'s tables?

Tnx and sorry for my english :)
Technical Details
Message-ID: <q050mpmn1rpw$.1ivfliub0nijw.dlg@40tude.net>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!newsfeed0.kamp.net!newsfeed.kamp.net!news.netcologne.de!newsfeed-fusi2.netcologne.de!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!nntp.infostrada.it!twister1.libero.it.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,44a3eeb89796c3cf,start
X-Google-Attributes: gid114a0e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!newsfeed0.kamp.net!newsfeed.kamp.net!news.netcologne.de!newsfeed-fusi2.netcologne.de!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!nntp.infostrada.it!twister1.libero.it.POSTED!not-for-mail
From: "Andrea [Work]" <nospam@invalid.invalid>
Subject: How to Rebuild all Index
Newsgroups: borland.public.interbase.sql
User-Agent: 40tude_Dialog/2.0.15.1it
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <q050mpmn1rpw$.1ivfliub0nijw.dlg@40tude.net>
X-Face:  "BKr*nrS-geS`1'I10/ffIIF/{LqmQ;("2{]3)T|k:2&UK9U(>zx$-:f%o|I8[o<?#@V\UL fc+UJn3vQ]O/=~>YAN8%{g/xI]<IqS7(=<1S<Won`Y&3[VLr
Lines: 20
Date: Thu, 26 Jul 2007 10:35:29 GMT
NNTP-Posting-Host: 151.38.79.54
X-Complaints-To: abuse@libero.it
X-Trace: twister1.libero.it 1185446129 151.38.79.54 (Thu, 26 Jul 2007 12:35:29 MET DST)
NNTP-Posting-Date: Thu, 26 Jul 2007 12:35:29 MET DST
Organization: [Infostrada]