[postgis-users] Query performance help

Markus Schaber markus at schabi.de
Thu Mar 24 00:08:26 PST 2005


Hi, Paul,
Hi, Stephen,

Paul Ramsey schrieb:
> Some potential gotchas:
> - I have been suckered in the past when it turned out I had mismatched
> types in the columns I was joining. (an int8 on one side and an int4 on
> the other). This caused postgresql to choose a terrible query plan.

One can work around this using explicit casts, like in

SELECT * FROM table WHERE 42::int8=column;

Additionally, PostgreSQL 8.0 has severe improvements in this area.

Markus



More information about the postgis-users mailing list