Bruce Momjian <maillist@candle.pha.pa.us> writes:
>> But what makes me unhappy right now is that with -F COPY FROM takes
>> JUST 3 min !!! (And 16 min without -F)
>> Isn't parsing/planning overhead toooo big ?!
> Yikes. I always thought it would be nice to try and cache query plans
> by comparing parse trees, and if they match cached versions, replace any
> constants with new ones and use cached query plan. Hard to do right,
> though.
But INSERT ... VALUES(...) has such a trivial plan that it's hardly
likely to be worth caching. We probably ought to do some profiling to
see where the time is going, and see if we can't speed things up for
this simple case.
In the meantime, the conventional wisdom is still that you should use
COPY, if possible, for bulk data loading. (If you need default values
inserted in some columns then this won't do...)
regards, tom lane