Re: [ADMIN] REINDEX during a transaction

2006-03-01 Thread Jim C. Nasby
On Wed, Mar 01, 2006 at 10:23:41AM -0500, Tom Lane wrote: > Ashley Moran <[EMAIL PROTECTED]> writes: > > BEGIN WORK; > > DELETE FROM X; COPY X ...; REINDEX TABLE X; > > DELETE FROM Y; COPY Y ...; REINDEX TABLE Y; > > DELETE FROM Z; COPY Z ...; REINDEX TABLE Z; > > COMMIT; > > Why don't you use TRU

Re: [ADMIN] REINDEX during a transaction

2006-03-01 Thread Tom Lane
Ashley Moran <[EMAIL PROTECTED]> writes: > BEGIN WORK; > DELETE FROM X; COPY X ...; REINDEX TABLE X; > DELETE FROM Y; COPY Y ...; REINDEX TABLE Y; > DELETE FROM Z; COPY Z ...; REINDEX TABLE Z; > COMMIT; Why don't you use TRUNCATE? Why do you think you need REINDEX at all? If you do need it, you'

[ADMIN] REINDEX during a transaction

2006-02-28 Thread Ashley Moran
I'm sure this is a simple question but the docs only go as far as "For all indexes except the shared system catalogs, REINDEX is crash-safe and transaction-safe." I have a transaction that imports about 2.3 GB of data as pairs of DELETE FROM / COPY. What is the difference between reindexing ta