pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Shaun Thomas <sthomas@townnews.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Cost limit.
Date: Fri, 18 May 2001 12:12:07 -0400 (EDT)
Message-ID: <200105181612.f4IGC7U29140@candle.pha.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.30.0105181049160.4466-100000@hamster.lee.net>

> 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.

I don't think our optimizer estimates are that accurate.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



view thread (8+ messages)  latest in thread

Message-ID: <200105181612.f4IGC7U29140@candle.pha.pa.us>
Permalink:  ../200105181612.f4IGC7U29140@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200105181612.f4IGC7U29140@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: pgman@candle.pha.pa.us, sthomas@townnews.com
  Subject: Re: Cost limit.
  In-Reply-To: <200105181612.f4IGC7U29140@candle.pha.pa.us>
  References: <Pine.LNX.4.30.0105181049160.4466-100000@hamster.lee.net> <200105181612.f4IGC7U29140@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox