Re: Simple join optimized badly?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux