Skip site navigation (1) Skip section navigation (2)

Re: FreeBSD, Linux: select, select count(*) performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org,pgsql-sql(at)postgresql(dot)org
Subject: Re: FreeBSD, Linux: select, select count(*) performance
Date: 2002-11-27 16:15:58
Message-ID: 17919.1038413758@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackerspgsql-sql
Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: David WheelerDate: 2002-11-27 16:17:12
Subject: Re: Interface update for 7.3
Previous:From: Jason E. StewartDate: 2002-11-27 16:09:42
Subject: Re: Interface update for 7.3

pgsql-sql by date

Next:From: Oleg BartunovDate: 2002-11-27 16:29:43
Subject: Re: [GENERAL] FreeBSD, Linux: select, select count(*) performance
Previous:From: Richard HuxtonDate: 2002-11-27 15:35:15
Subject: Re: Function and insert

pgsql-general by date

Next:From: Tom LaneDate: 2002-11-27 16:18:57
Subject: Re: Server v7.3RC2 Dies
Previous:From: Scott LambDate: 2002-11-27 16:08:38
Subject: Re: escape single quote in INSERT command

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group