pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Craig A. James <cjames@modgraph-usa.com>
Cc: Steve Atkins <steve@blighty.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance of count(*)
Date: Thu, 22 Mar 2007 14:37:26 -0400
Message-ID: <20588.1174588646@sss.pgh.pa.us> (raw)
In-Reply-To: <4602C921.3070303@modgraph-usa.com>
References: <Pine.LNX.4.62.0703221149210.13747@wr-linux02>
	<200703221208.19358.albert@sedifa.com>
	<Pine.LNX.4.64.0703221323590.1503@ismoli.solenovo.jns>
	<20070322141807.GE11402@mathom.us>
	<46029DE3.9030505@modgraph-usa.com>
	<4602A15B.7000908@wildenhain.de>
	<4602BB19.9050306@modgraph-usa.com>
	<228F06CD-3642-4A42-813A-648285A3BDBC@blighty.com>
	<4602C921.3070303@modgraph-usa.com>

"Craig A. James" <cjames@modgraph-usa.com> writes:
> Steve Atkins wrote:
>> As long as you're ordering by some row in the table then you can do that in
>> straight SQL.
>> 
>> select a, b, ts from foo where (stuff) and foo > X order by foo limit 10
>> 
>> Then, record the last value of foo you read, and plug it in as X the next
>> time around.

> We've been over this before in this forum: It doesn't work as advertised.  Look for postings by me regarding the fact that there is no way to tell the optimizer the cost of executing a function.  There's one, for example, on Oct 18, 2006.

You mean
http://archives.postgresql.org/pgsql-performance/2006-10/msg00283.php
?  I don't see anything there that bears on Steve's suggestion.
(The complaint is obsolete as of CVS HEAD anyway.)

			regards, tom lane



view thread (41+ messages)  latest in thread

Message-ID: <20588.1174588646@sss.pgh.pa.us>
Permalink:  ../20588.1174588646@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20588.1174588646@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, cjames@modgraph-usa.com, steve@blighty.com
  Subject: Re: Performance of count(*)
  In-Reply-To: <20588.1174588646@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