Re: Simple join optimized badly?

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

 



Jonah H. Harris wrote:
> On Oct 08, 2006 07:05 PM, Josh Berkus <josh@xxxxxxxxxxxx> wrote:
> > Hints are used because the DBA thinks that they are smarter than
> > the optimizer; 99% of the time, they are wrong.
> 
> That's a figure which I'm 100% sure cannot be backed up by fact.
> 
> > Just try manually optimizing a complex query, you'll see -- with three
> > join types, several scan types, aggregates, bitmaps, [blah blah blah]
> > it's significantly more than a human can figure out accurately.
> 
> Let me get this right... the optimizer is written by humans who know and
> can calculate the proper query plan and generate code to do the same;
> yet humans aren't smart enough to optimize the queries themselves? A bit
> of circular reasoning here?

I can do 100! on my computer, but can't do it in my head.

-- 
  Bruce Momjian   bruce@xxxxxxxxxx
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +


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

  Powered by Linux