pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mladen Gogala <mgogala@vmsinfo.com>
To: Neil Whelchel <neil.whelchel@gmail.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Slow count(*) again...
Date: Mon, 11 Oct 2010 16:58:37 -0400
Message-ID: <4CB37A7D.90502@vmsinfo.com> (raw)
In-Reply-To: <201010111254.58479.neil.whelchel@gmail.com>
References: <201010091626.18636.neil.whelchel@gmail.com>
	<AANLkTimayTM__hHu9RoiLaNhzfpNY6Vo5y4OkbX_sV=o@mail.gmail.com>
	<4CB34D69.6060108@emolecules.com>
	<201010111254.58479.neil.whelchel@gmail.com>

Neil Whelchel wrote:
>
>
> That is why I suggested an estimate(*) that works like (a faster) count(*) 
> except that it may be off a bit. I think that is what he was talking about 
> when he wrote this.
>
>   
The main problem with "select count(*)" is that it gets seriously 
mis-used.  Using "select count(*)" to establish existence is bad for 
performance and for code readability. 

-- 
 
Mladen Gogala 
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
http://www.vmsinfo.com 
The Leader in Integrated Media Intelligence Solutions






view thread (246+ messages)  latest in thread

Message-ID: <4CB37A7D.90502@vmsinfo.com>
Permalink:  ../4CB37A7D.90502@vmsinfo.com/
Also on:    postgresql.org/message-id/4CB37A7D.90502@vmsinfo.com

 · 

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: mgogala@vmsinfo.com, neil.whelchel@gmail.com
  Subject: Re: Slow count(*) again...
  In-Reply-To: <4CB37A7D.90502@vmsinfo.com>

* 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