pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Achilleus Mantzios <achill@matrix.gatewaynet.com>
Cc: pgsql-general@postgresql.org
Cc: pgsql-hackers@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: FreeBSD, Linux: select, select count(*) performance
Date: Wed, 27 Nov 2002 11:15:58 -0500
Message-ID: <17919.1038413758@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.44.0211271320530.24849-100000@matrix.gatewaynet.com>
References: <Pine.LNX.4.44.0211271320530.24849-100000@matrix.gatewaynet.com>

Achilleus Mantzios <achill@matrix.gatewaynet.com> 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



view thread (6+ messages)  latest in thread

Message-ID: <17919.1038413758@sss.pgh.pa.us>
Permalink:  ../17919.1038413758@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17919.1038413758@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, achill@matrix.gatewaynet.com, pgsql-general@postgresql.org, pgsql-hackers@postgresql.org
  Subject: Re: FreeBSD, Linux: select, select count(*) performance
  In-Reply-To: <17919.1038413758@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox