Re: Simple join optimized badly? - Mailing list pgsql-performance

From Craig A. James
Subject Re: Simple join optimized badly?
Date
Msg-id 4529B724.9070904@modgraph-usa.com
Whole thread Raw
In response to Re: Simple join optimized badly?  (Bruce Momjian <bruce@momjian.us>)
List pgsql-performance
Bruce Momjian wrote:
> I can do 100! on my computer, but can't do it in my head.

A poor example.  100! is a simple repetative calculation, something computers are very good at.  Optimizing an SQL
queryis very difficult, and a completely different class of problem. 

The fact is the PG team has done a remarkable job with the optimizer so far.   I'm usually very happy with its plans.
Buthumans still beat computers at many tasks, and there are unquestionably areas where the PG optimizer is not yet
fullydeveloped. 

When the optimizer reaches its limits, and you have to get your web site running, a HINT can be invaluable.

I said something in a previous version of this topic, which I'll repeat here.  The PG documentation for HINTs should be
FILLEDwith STRONG ADMONITIONS to post the problematic queries here before resorting to hints. 

There will always be fools who abuse hints.  Too bad for them, but don't make the rest of us suffer for their folly.

Craig


pgsql-performance by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: Simple join optimized badly?
Next
From: "Craig A. James"
Date:
Subject: Re: Simple join optimized badly?