Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id ACD069FC35B for ; Fri, 18 May 2007 14:48:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 09527-09 for ; Fri, 18 May 2007 14:48:04 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 309D49FC36D for ; Fri, 18 May 2007 14:48:05 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l4IHm21c000260; Fri, 18 May 2007 13:48:02 -0400 (EDT) To: "Mark Harris" cc: pgsql-performance@postgresql.org Subject: Re: reading large BYTEA type is slower than expected In-reply-to: References: Comments: In-reply-to "Mark Harris" message dated "Fri, 18 May 2007 10:11:51 -0700" Date: Fri, 18 May 2007 13:48:02 -0400 Message-ID: <259.1179510482@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/329 X-Sequence-Number: 24719 "Mark Harris" writes: > We have recently ported our application to the postgres database. For > the most part performance has not been an issue; however there is one > situation that is a problem and that is the initial read of rows > containing BYTEA values that have an average size of 2 kilobytes or > greater. For BYTEA values postgres requires as much 3 seconds to read > the values from disk into its buffer cache. How large is "large"? (No, I don't believe it takes 3 sec to fetch a single 2Kb value.) regards, tom lane