From: Ron Johnson <ron.l.johnson@cox.net>
To: PgSQL Performance ML <pgsql-performance@postgresql.org>
Subject: Re: index questions
Date: 25 Jul 2003 12:21:25 -0500
Message-ID: <1059153685.26037.135.camel@haggis> (raw)
In-Reply-To: <1059151963.1183.14.camel@taz>
References: <1059151963.1183.14.camel@taz>
On Fri, 2003-07-25 at 11:52, Franco Bruno Borghesi wrote:
[snip]
>
>
> Will findSale() in the future, when I have *many* rows still use the
> index when only the first couple of
> arguments are passed to the function?
> If not, should I create more indexes (and functions) for each possible
> argument combination? (of course, with
> the given order)
>
> The thing here is that I don't understand how postgreSQL solves the
> query when the COALESCEs are used... it uses
> the index now, with a few thowsand records, but what will happen in a
> few months?
When faced with cases like this, I cobble together a script/program
that generates a few million rows of random data (within the confines
of FKs, of course) to populate these tables like "sales", and then I
see how things perform.
--
+-----------------------------------------------------------------+
| Ron Johnson, Jr. Home: ron.l.johnson@cox.net |
| Jefferson, LA USA |
| |
| "I'm not a vegetarian because I love animals, I'm a vegetarian |
| because I hate vegetables!" |
| unknown |
+-----------------------------------------------------------------+
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-performance@postgresql.org
Cc: ron.l.johnson@cox.net
Subject: Re: index questions
In-Reply-To: <1059153685.26037.135.camel@haggis>
References: <1059151963.1183.14.camel@taz> <1059153685.26037.135.camel@haggis>
* 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