pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Bucky Jordan <bjordan@lumeta.com>
Cc: josh@agliodbs.com, "Jim C. Nasby" <jim@nasby.net>
Cc: pgsql-hackers@postgresql.org
Cc: pgsql-performance@postgresql.org
Subject: Re: [HACKERS] Hints proposal
Date: Thu, 12 Oct 2006 18:02:07 -0400
Message-ID: <20061012220207.GI18764@alvh.no-ip.org> (raw)
In-Reply-To: <78ED28FACE63744386D68D8A9D1CF5D4209CA5@MAIL.corp.lumeta.com>
References: <200610121358.22739.josh@agliodbs.com>
	<78ED28FACE63744386D68D8A9D1CF5D4209CA5@MAIL.corp.lumeta.com>

Bucky Jordan wrote:

> What about using regular expressions, plus, if you have a function
> (views, or any other statement that is stored), you can assign a rule to
> that particular function. So you get matching, plus explicit selection.
> This way it's easy to find all your hints, turn them off, manage them,
> etc. (Not to mention dynamically generated SQL is ugly enough without
> having to put hints in there).

The regular expression idea that's being floated around makes my brain
feel like somebody is screeching a blackboard nearby.  I don't think
it's a sane idea.  I think you could achieve something similar by using
stored plan representations, like we do for rewrite rules.  So you'd
look for, say, a matching join combination in a catalog, and get a
selectivity from a function that would get the selectivities of the
conditions on the base tables.  Or something like that anyway.

That gets ugly pretty fast when you have to extract selectivities for
all the possible join paths in any given query.

But please don't talk about regular expressions.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



view thread (74+ messages)  latest in thread

Message-ID: <20061012220207.GI18764@alvh.no-ip.org>
Permalink:  ../20061012220207.GI18764@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20061012220207.GI18764@alvh.no-ip.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: alvherre@commandprompt.com, bjordan@lumeta.com, jim@nasby.net, pgsql-hackers@postgresql.org
  Subject: Re: [HACKERS] Hints proposal
  In-Reply-To: <20061012220207.GI18764@alvh.no-ip.org>

* 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