Re: Slow count(*) again...

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: mladen.gogala@vmsinfo.com
Cc: "david@lang.hm" <david@lang.hm>, Craig Ringer <craig@postnewspapers.com.au>, Vitalii Tymchyshyn <tivv00@gmail.com>, "pgsql-performance@postgresql.org" <pgsql-performance@postgresql.org>
Date: 2010-10-12T13:56:30Z
Lists: pgsql-hackers, pgsql-performance
Mladen Gogala <mladen.gogala@vmsinfo.com> 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