d_nardini(at)btconnect(dot)com writes:
> I'm running the following statement on a (development) Mac OS X (PG 7.2)
> box and on a (production) RedHat 7.0 (PG 7.1.3) box. On the OS X it's
> performing very well ... on RH it's VERY SLOW, with CPU utilization
> hitting 90%+ (on OS X it hardly exceeds 2%).
Hmm. Nested intersects are actually broken in 7.1.*, cf.
http://archives.postgresql.org/pgsql-bugs/2001-08/msg00064.php
Do you get the same results from both boxes?
> BTW - replacing 'intersect'
> with 'union' in the SQL behaves the same.
In that case it might possibly be a different problem. Do you get the
same EXPLAIN plan on both boxes?
regards, tom lane