Re: Copy command Faster than original select - Mailing list pgsql-performance

From Pavel Stehule
Subject Re: Copy command Faster than original select
Date
Msg-id CAFj8pRCkqLj6spyZ1Kghg_on8a9pEGzAAueUD-RZKcvvuKCz-w@mail.gmail.com
Whole thread Raw
In response to Re: Copy command Faster than original select  (Belal Al-Hamed <belalhamed@gmail.com>)
List pgsql-performance


2015-02-06 14:39 GMT+01:00 Belal Al-Hamed <belalhamed@gmail.com>:
Let me change my question to this perhaps it would be clearer

why writing data result of select statment from PG server to file on disk
using copy statement is much faster than getting same data through PGAdmin
via libpg on the same PC on the same system on the same connection
(localhost) ?

COPY to filesystem can use a more CPU, and on modern computers, a data are stored to write cache first - and real IO operation can be processed later.

PgAdmin uses only one CPU and works with expensive interactive element - grid - probably there are some space for optimization - usually fill 40K rows to pgAdmin is not good idea (it is not good idea for any client).



--
View this message in context: http://postgresql.nabble.com/Copy-command-Faster-than-original-select-tp5836886p5836933.html
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.


--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

pgsql-performance by date:

Previous
From: Belal Al-Hamed
Date:
Subject: Re: Copy command Faster than original select
Next
From: Matheus de Oliveira
Date:
Subject: Re: Copy command Faster than original select