Hi Tom, Thanks for your reply. > What PG version are we talking about here? For development I use 9.1.3, on the production server is 8.4.7 - happens with both cases. > That doesn't sound like a tremendously good idea to me. Could you elaborate on the downsides of this approach a bit? > But with > so few details, it's hard to comment intelligently. > Can you provide a concrete test case? A self contained testcase would take some time to create (and list members willing to configure and run), so I hope a query as well as an explain-analyze run will provide more information (done with 9.1.3): http://pastebin.com/BGRdAPg2 Its kind of the worst-worst case which I will improve later (way too much relations loaded through join-fetching), but its quite a good way to show the issue. Replacing the IN with a ANY(ARRAY()) already yields a way better plan. Thank you in advance, Clemens -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance