Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id CC2411337B83 for ; Tue, 12 Oct 2010 10:56:44 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 27207-05 for ; Tue, 12 Oct 2010 13:56:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 54A1B1335B36 for ; Tue, 12 Oct 2010 10:56:37 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o9CDuULE023517; Tue, 12 Oct 2010 09:56:30 -0400 (EDT) To: mladen.gogala@vmsinfo.com cc: "david@lang.hm" , Craig Ringer , Vitalii Tymchyshyn , "pgsql-performance@postgresql.org" Subject: Re: Slow count(*) again... In-reply-to: <4CB4542E.5010406@vmsinfo.com> References: <201010091626.18636.neil.whelchel@gmail.com> <4CB34D69.6060108@emolecules.com> <4CB4149D.8030803@gmail.com> <4CB41902.1020503@postnewspapers.com.au> <4CB4542E.5010406@vmsinfo.com> Comments: In-reply-to Mladen Gogala message dated "Tue, 12 Oct 2010 08:27:26 -0400" Date: Tue, 12 Oct 2010 09:56:30 -0400 Message-ID: <23516.1286891790@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/146 X-Sequence-Number: 40565 Mladen Gogala writes: > The number of rows is significantly smaller, but the table contains > rather significant "text" field which consumes quite a bit of TOAST > storage and the sizes are comparable. Postgres read through 27GB in 113 > seconds, less than 2 minutes and oracle took 2 minutes 37 seconds to > read through 35GB. I stand corrected: there is nothing wrong with the > speed of the Postgres sequential scan. Um ... the whole point of TOAST is that the data isn't in-line. So what Postgres was actually reading through was probably quite a lot less than 27Gb. It's probably hard to make a completely apples-to-apples comparison because the two databases are so different, but I don't think this one proves that PG is faster than Oracle. regards, tom lane