Mike Mascari <mascarm@mascari.com> writes:
> Could you give me a bit of direction?
> [ same query works in one DB and crashes in another ]
I have a feeling this is a problem with an incorrect plan --- possibly
the same thing I just fixed a few days ago,
http://archives.postgresql.org/pgsql-committers/2004-01/msg00134.php
or perhaps another bug. Look at EXPLAIN output and see if the two
databases are generating different plans for the query. If so, perhaps
ANALYZE in the test database is needed? In any case, don't ANALYZE in
the development DB, for fear of moving the stats enough to make the
problem go away ...
regards, tom lane