Skip to content
PostgreSQL join optimisation with Simulated Annealing
C Python Other
Find file
Failed to load latest commit information.
doc Try to adapt the layout to what PGXN wants.
pgcon2010 Test script updates
queries Test script updates
scripts Add timeout to test driver, parametrise it a bit more
src Fix typo that breaks compilation.
.gitignore Add saio_probes.h to .gitignore
META.json Change the release status to unstable
Makefile Use DTrace for debugging instrumentation instead of hand-rolled stuff. Try to adapt the layout to what PGXN wants.
saio.control Try to adapt the layout to what PGXN wants.


An extension module for PostgreSQL that implements join order search with Simulated Annealing.

It's in early stages of development and definitely not suitable for production use. It doesn't meet any portability or code quality requirements yet. It does produce valid plans, though.

To use it, you will need the PostgreSQL development headers. Compile and install with:

$ make
$ sudo make install

After that log in to your PostgreSQL server with a superuser account and issue:

=# LOAD 'saio';

By default all queries will be planned using SAIO, to disable it use:

=# SET saio TO 'false';

Beware, if the module has been compiled against a server with assertion checking enabled, it will run extremely slowly and it will write debugging information to the /tmp directory.

You can learn more about SAIO by reading the PGCon2010 presentation. Get it by entering the pgcon2010/ directory and typing make.

Something went wrong with that request. Please try again.