Re: Big disappointment with Postgres

From: Mladen Gogala <>
Date: Fri, 4 Feb 2011 19:12:19 +0000 (UTC)
Message-ID: <>

On Fri, 04 Feb 2011 18:41:05 +0100, Hans Castorp wrote:

> I have been developing applications backed by DBMS for 20 years now, and

And I have been a DBA for more than that.

> I never had the need to use hints (neither on Oracle nor on any other
> DBMS like rdb/VMS, DB2, SQL Server or Postgres). Hints have always been
> an absolute no-go and no SQL statement would have passed our quality
> controls that would only run with hints enabled (except for maybe a
> total of 10 statements in all those years)

First of all, this is demonstrably false idea. Optimizer, no matter how smart it might be, cannot help you with the correlated data. When you have the data with an intricate correlation, like the date of birth and Zodiac sign, to borrow Jonathan Lewis example, optimizer cannot know the right way of doing things. Oracle allows creating extended statistics, but even those will sometimes fail miserably with things like semijoin. In the situation when there is correlated data, the optimizer can be counted on to do exactly the wrong thing, no matter what the database is. In that case, the only solution is a human directive to the optimizer. That is what hints are.

> If the only way you can get your stuff to run are hints, then you have
> some serious flaws in your application and DB design.

Or, it may be a porting project, done for a different database? Are you willing to come over here and define the budget and the resources for the project that should be done right? I'm sure that our CIO and CFO would love that.

> You should better
> fix _your_ application than insulting the developers of the Postgres
> team.

Postgres team is insulting its users by the deep mistrust toward them and frequently repeated ludicrous idea that the optimizer is smarter than the DBA. Josh Berkus, the genius behind "we don't want hints" fatwa on the Pg wiki, has even explicitly said so.

I have wasted more than a year, learning the product, installing it, getting it in the company and even getting the company that I work for to host two Postgres meetings, only to be told by the designers that I am so stupid that a computer program is smarter than me? Are you kidding me? The designers of the product who distrust their users so deeply and subscribe to the demonstrably false mantra that "optimizer is smarter than the DBA" do not deserve much respect. BTW, have you considered using the term "DBA 2.0"? Optimizer might be smarter than those guys, I give you that.

At any rate, in my opinion porting projects from Oracle to Postgres without hints are doomed to failure. Taking down that idiotic fatwa from the Postgres wiki and putting hints on the ToDo list would be the first signs that things are going the right direction. Until then, I will stay away from Postgres.

Received on Fri Feb 04 2011 - 13:12:19 CST

Original text of this message