Re: [PERFORM] need vacuum after insert/truncate/insert?

2006-07-07 Thread Markus Schaber
Hi, Craig,

Craig A. James wrote:
 If I insert a bunch of rows, then truncate, then insert a bunch more
 rows, do I need to vacuum?  I've been assuming that TRUNCATE TABLE is a
 brute-force technique that more-or-less tosses the old table and starts
 fresh so that no vacuum is necessary.
 
 Second question: Same scenario as above, but now the table has indexes. 
 Is a reindex needed, or are the indexes they truncated too?

AFAIK, both table and indices are cut down nicely.

But you will need an ANALYZE after refilling of the table, to have
current statistics.


HTH,
Markus


-- 
Markus Schaber | Logical TrackingTracing International AG
Dipl. Inf. | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[PERFORM] need vacuum after insert/truncate/insert?

2006-07-06 Thread Craig A. James

If I insert a bunch of rows, then truncate, then insert a bunch more rows, do I 
need to vacuum?  I've been assuming that TRUNCATE TABLE is a brute-force 
technique that more-or-less tosses the old table and starts fresh so that no 
vacuum is necessary.

Second question: Same scenario as above, but now the table has indexes.  Is a reindex 
needed, or are the indexes they truncated too?

Thanks,
Craig


---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings