Re: Cost limit.

From: Shaun Thomas <sthomas(at)townnews(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Cost limit.
Date: 2001-05-18 15:55:54
Message-ID: Pine.LNX.4.30.0105181049160.4466-100000@hamster.lee.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Fri, 18 May 2001, Bruce Momjian wrote:

> That is on the TODO list:
>
> * Add SET or BEGIN timeout parameter to cancel query if waiting
> too long

Actually I was thinking of something to cut the query off at the pass. I
looked through the code, and it does a query plan and uses the one with
least cost. So, theoretically, I should be able to hack the code so that
it will refuse to execute a query if the best query plan has an estimated
cost of over 100,000 for example.

Some kind of error like: "Query not executed due to detection of possible
cross product."

Of course, I'd like to stay away from source hacks, besides It would be
nice to tune from postgresql.conf as a parameter like max_query_cost.

The source is a bit spaghetti-ish, and I'm having a hard time following
some of the macros, typedefs and structs. I don't think I could add
a feature like this myself.

--
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Shaun M. Thomas INN Database Programmer |
| Phone: (309) 743-0812 Fax : (309) 743-0830 |
| Email: sthomas(at)townnews(dot)com AIM : trifthen |
| Web : hamster.lee.net |
| |
| "Most of our lives are about proving something, either to |
| ourselves or to someone else." |
| -- Anonymous |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Stefan Huber 2001-05-18 16:07:41 Re: createdb -D /other/path dbname does not work
Previous Message Stefan Huber 2001-05-18 15:52:18 Re: Script to createuser