Re: Simple join optimized badly?

From: "Craig A(dot) James" <cjames(at)modgraph-usa(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Simple join optimized badly?
Date: 2006-10-09 02:42:44
Message-ID: 4529B724.9070904@modgraph-usa.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 query is 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. But humans still beat computers at many tasks, and there are unquestionably areas where the PG optimizer is not yet fully developed.

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 FILLED with 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Craig A. James 2006-10-09 02:46:00 Re: Simple join optimized badly?
Previous Message Mark Kirkwood 2006-10-09 02:41:20 Re: Simple join optimized badly?