pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Adam Rich <adam.r@sbcglobal.net>
Cc: 'Craig A. James' <cjames@modgraph-usa.com>
Cc: 'Guy Rouillier' <guyr-ml1@burntmail.com>
Cc: 'PostgreSQL Performance' <pgsql-performance@postgresql.org>
Subject: Re: High update activity, PostgreSQL vs BigDBMS
Date: Sun, 07 Jan 2007 21:47:52 -0500
Message-ID: <19873.1168224472@sss.pgh.pa.us> (raw)
In-Reply-To: <022d01c732cc$69f0e2a0$6400a8c0@dualcore>
References: <022d01c732cc$69f0e2a0$6400a8c0@dualcore>

"Adam Rich" <adam.r@sbcglobal.net> writes:
> I'm using 8.2 and using order by & limit is still faster than MAX()
> even though MAX() now seems to rewrite to an almost identical plan
> internally.

Care to quantify that?  AFAICT any difference is within measurement
noise, at least for the case of separately-issued SQL commands.

> Count(*) still seems to use a full table scan rather than an index scan.

Yup.  Don't hold your breath for something different.  Postgres has made
design choices that make certain cases fast and others slow, and
count(*) is one case that has come out on the short end of the stick.
If that's your most important measure of performance, then indeed you
should select a different database that's made different tradeoffs.

			regards, tom lane



view thread (39+ messages)  latest in thread

Message-ID: <19873.1168224472@sss.pgh.pa.us>
Permalink:  ../19873.1168224472@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19873.1168224472@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-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, adam.r@sbcglobal.net, cjames@modgraph-usa.com, guyr-ml1@burntmail.com
  Subject: Re: High update activity, PostgreSQL vs BigDBMS
  In-Reply-To: <19873.1168224472@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