pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Rob Tester <robtester@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Help with optional parameters
Date: Wed, 16 Aug 2006 23:21:14 -0600
Message-ID: <20060817052114.GA77128@winnie.fuhr.org> (raw)
In-Reply-To: <f5f60fb50608162039g59585cflbf75aebf0a137bc4@mail.gmail.com>
References: <f5f60fb50608162039g59585cflbf75aebf0a137bc4@mail.gmail.com>

On Wed, Aug 16, 2006 at 08:39:49PM -0700, Rob Tester wrote:
> What is the best way to write a query and get the planner to use indexes
> when you have optional parameters and columns that can contain NULL values?

Have you considered building a query string and using EXECUTE?
That's not as "neat" as a static query but it might be worth testing.

-- 
Michael Fuhr



view thread (6+ messages)  latest in thread

Message-ID: <20060817052114.GA77128@winnie.fuhr.org>
Permalink:  ../20060817052114.GA77128@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20060817052114.GA77128@winnie.fuhr.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-sql@postgresql.org
  Cc: mike@fuhr.org, robtester@gmail.com
  Subject: Re: Help with optional parameters
  In-Reply-To: <20060817052114.GA77128@winnie.fuhr.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