On Mon, 12 Nov 2001, Frank Bax wrote:
> Expecting more questions like yours, I did a little more research. The
> import is all INSERT's except for two selects. I realised I could rewrite
> a portion of the code to remove one of those SELECT's. Guess What no
> effect on run-time. Isn't that curious? So I pondered that for a while
> and thought that if removeing one SELECT didn't make any difference, then
> making changes to the second SELECT (which was on same table) wsn't likely
> to change anything either. If that's true then the problem was only
> INSERT's. A little more pondering and I remember that I looked a little
> closer at startup parms during the PG upgrade. I had removed -F option.
> Put it back in and runtime dropped to 10 minutes again - problem solved!
Maybe you are paying too much transaction overhead. Is your script one
single transaction? If you explicitly make it so by means of enclosing
it all in a BEGIN-COMMIT block (or several, depending on how much INSERT
clauses you have) it will perhaps run much faster.
HTH...
--
Alvaro Herrera (<alvherre[@]atentus.com>)
"Crear es tan dificil como ser libre" (Elsa Triolet)