On Mon, Jul 13, 2009 at 3:48 PM, decibel<deci...@decibel.org> wrote: > On Jul 13, 2009, at 1:06 PM, Simon Riggs wrote: >> >> Not just because of this but I wonder if we might benefit from an >> optimizer setting specifically aimed at the foolishnesses of >> automatically generated SQL. > > > +1. And it's not just ORMs that do stupid things, I've seen crap like this > come out of users too (not this exact case, but similar). >
i've this come from users most of the time... the few systems i have seen that generate sql, try to avoid using complex queries and make simple ones and the JOIN them at the app level... > Perhaps what we really want is an "optimization level" GUC so that users can > tell the backend how much overhead they want the optimizer to spend on > trying to work around stupidity... :) i wonder what the levels have to be: - smart_sql - application_generated_sql - normal_user_sql - xtremely_stupid_sql - what_the_hell_sql ;) -- Atentamente, Jaime Casanova Soporte y capacitación de PostgreSQL AsesorÃa y desarrollo de sistemas Guayaquil - Ecuador Cel. +59387171157 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers