Robert Hansen did a talk at OSCON on a compressed annealing framework called Djinni: <http://sixdemonbag.org/Djinni/>
It's a framework to use compressed annealing (a derivative of simulated annealing) for finding approximate solutions to NP-complete problems such as the TSP with time windows. Note that while Djinni is implemented in C++, it already supports embedding via SWIG, and has a C wrapper and is accessible from other languages. And it's BSD-licensed... This has the potential to be an alternative to the present use of GEQO for query optimization for cases of large joins (e.g. - involving large numbers of tables). On the one hand, I'm somewhat suited to looking at this in that I have the operations research background to know what they're talking about. On the other hand, I'm not familiar with the optimizer, nor do I deal with sorts of cases with so many joins that this would be worthwhile. I've bounced a ToDo entry over to Bruce, and am making sure this is documented here on pgsql.hackers so that a web search can readily find it in the future... -- "cbbrowne","@","cbbrowne.com" http://www3.sympatico.ca/cbbrowne/ "It is far from complete, but it should explain enough that you don't just stare at your sendmail.cf file like a deer staring at an oncoming truck." -- David Charlap ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match