pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oleg Bartunov <oleg@sai.msu.su>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Achilleus Mantzios <achill@matrix.gatewaynet.com>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [GENERAL] FreeBSD, Linux: select, select count(*) performance
Date: Wed, 27 Nov 2002 19:29:43 +0300 (MSK)
Message-ID: <Pine.GSO.4.44.0211271928320.11279-100000@ra.sai.msu.su> (raw)
In-Reply-To: <17919.1038413758@sss.pgh.pa.us>

On Wed, 27 Nov 2002, Tom Lane wrote:

> 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.

Are there any reason to "fetch (and perhaps decompress) the TOAST entries"
just to count(*) without any WHERE clause ?


>
> 			regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

	Regards,
		Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83




view thread (6+ messages)  latest in thread

Message-ID: <Pine.GSO.4.44.0211271928320.11279-100000@ra.sai.msu.su>
Permalink:  ../Pine.GSO.4.44.0211271928320.11279-100000@ra.sai.msu.su/
Also on:    postgresql.org/message-id/Pine.GSO.4.44.0211271928320.11279-100000@ra.sai.msu.su

 · 

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: oleg@sai.msu.su, tgl@sss.pgh.pa.us, achill@matrix.gatewaynet.com, pgsql-hackers@postgresql.org
  Subject: Re: [GENERAL] FreeBSD, Linux: select, select count(*) performance
  In-Reply-To: <Pine.GSO.4.44.0211271928320.11279-100000@ra.sai.msu.su>

* 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