Re: generic copy options - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: generic copy options
Date
Msg-id 4AB2CA29.3060206@dunslane.net
Whole thread Raw
In response to Re: generic copy options  (Dan Colish <dan@unencrypted.org>)
Responses Re: generic copy options
List pgsql-hackers

Dan Colish wrote:
>     CREATE TABLE
>     INSERT 0 100000
>     Timing is on.
>     COPY 100000
>     Time: 83.273 ms
>     BEGIN
>     Time: 0.412 ms
>     TRUNCATE TABLE
>     Time: 0.357 ms
>     COPY 100000
>     Time: 140.911 ms
>     COMMIT
>     Time: 4.909 ms
>
>
>   

Anything that doesn't have times that are orders of magnitude greater 
than this is pretty much useless as a measurement of COPY performance, 
IMNSHO.

In this particular test, to check for paring times, I'd be inclined to 
do copy repeatedly (i.e. probably quite a few thousand times) from an 
empty file to test the speed. Something like:
   select current_timestamp;   begin;   truncate;   copy;copy;copy; ...   commit;   select current_timestamp;


(tests like this are really a good case for DO ' something'; - we could 
put a loop in the DO.)

cheers

andrew


pgsql-hackers by date:

Previous
From: Emmanuel Cecchet
Date:
Subject: Re: generic copy options
Next
From: Dan Colish
Date:
Subject: Re: generic copy options