Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id DDF759FA3D0 for ; Mon, 26 Feb 2007 05:03:51 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 53095-09 for ; Mon, 26 Feb 2007 05:03:48 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id 026D19FA4BB for ; Mon, 26 Feb 2007 05:03:47 -0400 (AST) Received: from server3.office.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 4DA3674574; Mon, 26 Feb 2007 08:56:34 +0000 (GMT) Received: from [192.168.1.36] (dell36.office.archonet.com [192.168.1.36]) by server3.office.archonet.com (Postfix) with ESMTP id D9230274092; Mon, 26 Feb 2007 08:56:33 +0000 (GMT) Message-ID: <45E2A0C1.3010803@archonet.com> Date: Mon, 26 Feb 2007 08:56:33 +0000 From: Richard Huxton User-Agent: IceDove 1.5.0.9 (X11/20061220) MIME-Version: 1.0 To: "msmbarabino@virgilio.it" Cc: pgsql-performance@postgresql.org Subject: Re: Very slow bytea data extraction References: <110efb42d61.msmbarabino@virgilio.it> In-Reply-To: <110efb42d61.msmbarabino@virgilio.it> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.207 tagged_above=0 required=5 tests=AWL, BAYES_50, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200702/279 X-Sequence-Number: 23333 msmbarabino@virgilio.it wrote: >> If you look at the "actual time" it's completing very quickly indeed. > So >> - it must be something to do with either: >> 1. Fetching/formatting > the data >>> 2. Transferring the data to the client. > > I do agree. > >> What > happens if you only select half the rows? Does the time to run the >> select halve? > > Yes, it does. > Using pgAdmin, the time to get all 36 > rows is about 67500ms while it's 24235ms to get only 18 rows. Hmm - I've seen reports about the traffic-shaping module not being install/activated making large data transfers slow. That was on Windows 2000 though. Might be worth searching the mail archives - I'm afraid I run PG on Linux mostly, so can't say for sure. One other thing I'd test. Make a small table with text columns of the same size and see how fast it is to select from that. If it's just as slow then it's your network setup. If it's much faster then it's something to do with the bytea type. -- Richard Huxton Archonet Ltd