Re: Why *exactly* is date_trunc() not immutable ? - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Why *exactly* is date_trunc() not immutable ?
Date
Msg-id 20070220022608.GH28395@alvh.no-ip.org
Whole thread Raw
In response to Re: Why *exactly* is date_trunc() not immutable ?  ("jungmin shin" <jungmin.shin@gmail.com>)
List 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

pgsql-general by date:

Previous
From: "jungmin shin"
Date:
Subject: Re: Why *exactly* is date_trunc() not immutable ?
Next
From: Tom Lane
Date:
Subject: Re: How to force disconnections from a Perl script?