Re: Mini improvement: statement_cost_limit - Mailing list pgsql-hackers

From Hans-Jürgen Schönig
Subject Re: Mini improvement: statement_cost_limit
Date
Msg-id 9121EEE5-2C0E-4E58-8D8D-80665F120926@cybertec.at
Whole thread Raw
In response to Re: Mini improvement: statement_cost_limit  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
>>

this entire thing is not about cartesian products at all.
it is about kicking out "expensive" queries before they even start to
eat up tons of CPU.
imagine a user asking for "give me all phone call in the US within the
past 10 years". you could kill the guy instantly because you know that
this would take ages.
in addition to that you know that in an OLTP context everything which
is expected to take longer than X cannot be useful anyway.
this has nothing to do with cartesian products or other bad things you
can do in SQL.
it is just a simple and heuristic check.
many thanks,
    hans



> My point is that people should _know_ they are using a cartesian
> product, and a warning would do that for users who have no need for a
> cartesian product and want to be warned about a possible error.
>
> --
>  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
>  EnterpriseDB                             http://enterprisedb.com
>
>  + If your life is a hard drive, Christ can be your backup. +


--
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt
Web: www.postgresql-support.de



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: proposal sql: labeled function params
Next
From: "Pavel Stehule"
Date:
Subject: Re: proposal sql: labeled function params