pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Grant Johnson <grant@amadensor.com>
To: pgsql-performance@postgresql.org
Subject: Re: [HACKERS] Slow count(*) again...
Date: Thu, 03 Feb 2011 18:18:28 -0700
Message-ID: <4D4B53E4.6010701@amadensor.com> (raw)
In-Reply-To: <4D4B4ACE.5090908@vmsinfo.com>
References: <201102012247.p11Ml6u02682@momjian.us>
	<4D48914B.4050403@dunslane.net>
	<4D489AD1.1010105@vmsinfo.com>
	<AANLkTiknZi97dDwm7sHqy0EL7tpNEP9sY5uPV6AN+q=u@mail.gmail.com>
	<4D499E55.4020107@vmsinfo.com>
	<4D49A6B9.4060608@2ndquadrant.com>
	<4D49C482.4010707@vmsinfo.com>
	<4D49F0BA.9000901@2ndquadrant.com>
	<4D4A16BF.1020304@vmsinfo.com>
	<4D4A4844.3020409@2ndquadrant.com>
	<4D4AD9F6.6040903@vmsinfo.com>
	<4D4AE16E.9040807@peak6.com>
	<4D4B17B4.9030406@vmsinfo.com>
	<4D4B1F5B.4060403@peak6.com>
	<4D4B261B.6010303@vmsinfo.com>
	<AANLkTi=6_7N4EuT-trfPbxb9UmanJsnL+ineO-iJUFtJ@mail.gmail.com>
	<4D4B2E8A.7010402@vmsinfo.com>
	<4D4ADF42020000250003A34C@gw.wicourts.gov>
	<4D4B3B41.7060803@vmsinfo.com>
	<AANLkTinMdsacnWJUADLg8URiSEKjXV3EmU=1XTAaCT-D@mail.gmail.com>
	<4D4B4ACE.5090908@vmsinfo.com>



On PostgreSQL, the difference in no hints and hints for that one query 
with skewed data is that the query finishes a little faster.   On some 
others, which shall remain nameless, it is the difference between 
finishing in seconds or days, or maybe never.  Hints can be useful, but 
I can also see why they are not a top priority.  They are rarely needed, 
and only when working around a bug.  If you want them so badly, you have 
the source, write a contrib module  (can you do that on Oracle or 
MSSQL?)  If I have a choice between the developers spending time on 
implementing hints, and spending time on improving the optimiser, I'll 
take the optimiser.

Tom Kyte agrees:
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:8912905298920
http://tkyte.blogspot.com/2006/08/words-of-wisdom.html



Oracle can be faster on count queries, but that is the only case I have 
seen.   Generally on most other queries, especially when it involves 
complex joins, or indexes on text fields, PostgreSQL is faster on the 
same hardware.




view thread (246+ messages)  latest in thread

Message-ID: <4D4B53E4.6010701@amadensor.com>
Permalink:  ../4D4B53E4.6010701@amadensor.com/
Also on:    postgresql.org/message-id/4D4B53E4.6010701@amadensor.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: grant@amadensor.com
  Subject: Re: [HACKERS] Slow count(*) again...
  In-Reply-To: <4D4B53E4.6010701@amadensor.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