REINDEX during a transaction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 tables during this transaction vs 
after? ie 

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;

vs

BEGIN WORK;
DELETE FROM X; COPY X ...;
DELETE FROM Y; COPY Y ...;
DELETE FROM Z; COPY Z ...;
COMMIT;

REINDEX TABLE X;
REINDEX TABLE Y;
REINDEX TABLE Z;


Thanks 

Ashley


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux