Copy command Faster than original select

From: belal <belalhamed(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Copy command Faster than original select
Date: 2015-02-06 08:30:39
Message-ID: 1423211439320-5836886.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

I made complex select using PGAdmin III Query Editor, Postgre server 9.3

select ... from mytable join .. join ... order by ....

I get [Total query runtime: 8841 ms. 43602 rows retrieved.]

but when I use

copy ([same above select]) to '/x.txt'
I get [Query returned successfully: 43602 rows affected, 683 ms execution
time.]

these test made on the same machine as the postgresql server.

can anyone explain huge difference in executing time?

best regards all

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

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Pavel Stehule 2015-02-06 08:38:20 Re: Copy command Faster than original select
Previous Message Pascal Depuis 2015-02-05 22:29:04 slow nested views in 9.3