Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YJeJO-0002x4-7K for pgsql-performance@arkaria.postgresql.org; Fri, 06 Feb 2015 08:30:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YJeJN-0000DK-Nc for pgsql-performance@arkaria.postgresql.org; Fri, 06 Feb 2015 08:30:49 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YJeJM-0000DC-6t for pgsql-performance@postgresql.org; Fri, 06 Feb 2015 08:30:48 +0000 Received: from mwork.nabble.com ([162.253.133.43]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YJeJE-00025V-Mn for pgsql-performance@postgresql.org; Fri, 06 Feb 2015 08:30:46 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mwork.nabble.com (Postfix) with ESMTP id BC19312FFA4F for ; Fri, 6 Feb 2015 00:30:39 -0800 (PST) Date: Fri, 6 Feb 2015 01:30:39 -0700 (MST) From: belal To: pgsql-performance@postgresql.org Message-ID: <1423211439320-5836886.post@n5.nabble.com> Subject: Copy command Faster than original select MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.3 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org 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. -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance