Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E81C4475E5E for ; Wed, 27 Nov 2002 11:15:54 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 1A071475A3F for ; Wed, 27 Nov 2002 11:15:54 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id gARGFwsX017920; Wed, 27 Nov 2002 11:15:58 -0500 (EST) To: Achilleus Mantzios Cc: pgsql-general@postgresql.org, pgsql-hackers@postgresql.org, pgsql-sql@postgresql.org Subject: Re: FreeBSD, Linux: select, select count(*) performance In-reply-to: References: Comments: In-reply-to Achilleus Mantzios message dated "Wed, 27 Nov 2002 14:23:12 +0200" Date: Wed, 27 Nov 2002 11:15:58 -0500 Message-ID: <17919.1038413758@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/1259 X-Sequence-Number: 33679 Achilleus Mantzios writes: > Linux q1 > ======== > dynacom=# EXPLAIN ANALYZE SELECT count(*) from noon; > NOTICE: QUERY PLAN: > Aggregate (cost=20508.19..20508.19 rows=1 width=0) (actual > time=338.17..338.17 > rows=1 loops=1) > -> Seq Scan on noon (cost=0.00..20237.95 rows=108095 width=0) (actual > time=0.01..225.73 rows=108095 loops=1) > Total runtime: 338.25 msec > Linux q2 > ======== > dynacom=# EXPLAIN ANALYZE SELECT * from noon; > NOTICE: QUERY PLAN: > Seq Scan on noon (cost=0.00..20237.95 rows=108095 width=1960) (actual > time=1.22..67909.31 rows=108095 loops=1) > Total runtime: 68005.96 msec You didn't say what was *in* the table, exactly ... but I'm betting there are a lot of toasted columns, and that the extra runtime represents the time to fetch (and perhaps decompress) the TOAST entries. regards, tom lane