Alberto Dalmaso <dalmaso@xxxxxxxxxx> wrote: > do you thing it is impossible to find a > configuration that works fine for both the kind of query? No. We probably just need a little more information. > The application have to run even versus oracle db... i wont have to > write a different source for the two database... I understand completely. > I attach the explanation of the log query after setting all the > enable to on. In this condition the query will never finish... We're getting close. Can you share the table structure and the actual query you are running? It's a lot easier (for me, anyway) to put this puzzle together with all the pieces in hand. Also, if you can set off some of the optimizer options and get a fast plan, please show us an EXPLAIN ANALYZE for that, with information on which settings were turned off. That will help show where bad estimates may be causing a problem, or possibly give a hint of table or index bloat problems. I think we're getting close to critical mass for seeing the solution.... -Kevin -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance