Re: Why *exactly* is date_trunc() not immutable ?

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: jungmin shin <jungmin(dot)shin(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Why *exactly* is date_trunc() not immutable ?
Date: 2007-02-20 02:26:08
Message-ID: 20070220022608.GH28395@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

jungmin shin escribió:
> I have a question about the query optimizer of a postgres.
> As long as I understood through a postgres manual, the postgres query
> optimizer is implemented using a *genetic algorithm.*

There is an algorithm said to be "genetic", but it only kicks in with
big joins; 12 tables on the default configuration. On queries with less
tables, the optimizer uses exhaustive search and lots of smarts.

See
http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/README?rev=1.39;content-type=text%2Fplain

> I'm thinking to modify the query optimizer.
> Are there any postgres version which uses typical dynamic programming
> approach for query optimization?
> Also, are there any body who have tried to modify the optimizer?

Sure, we have a very active optimizer hacker. He is too clever for the
rest of us to follow though :-( (I should speak only for myself here
of course). He goes by the name of Tom Lane.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-02-20 02:43:57 Re: How to force disconnections from a Perl script?
Previous Message jungmin shin 2007-02-20 01:58:45 Re: Why *exactly* is date_trunc() not immutable ?