Re: index questions - Mailing list pgsql-performance

From Ron Johnson
Subject Re: index questions
Date
Msg-id 1059153685.26037.135.camel@haggis
Whole thread Raw
In response to index questions  (Franco Bruno Borghesi <franco@akyasociados.com.ar>)
List pgsql-performance
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                                                      |
+-----------------------------------------------------------------+



pgsql-performance by date:

Previous
From: Ron Johnson
Date:
Subject: Re: hardware performance and some more
Next
From: Josh Berkus
Date:
Subject: Re: index questions