Re: Index not being used in MAX function (7.2.3)

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Index not being used in MAX function (7.2.3)
Date: 2003-06-13 20:58:13
Message-ID: 20030613205813.GA20982@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jun 13, 2003 at 15:12:39 -0500,
"Jim C. Nasby" <jim(at)nasby(dot)net> wrote:
> On Fri, Jun 13, 2003 at 10:37:46AM -0500, Bruno Wolff III wrote:
> > On Thu, Jun 12, 2003 at 17:26:11 -0500,
> > "Jim C. Nasby" <jim(at)nasby(dot)net> wrote:
> > > On Thu, Jun 12, 2003 at 12:08:15PM +0800, Ang Chin Han wrote:
> > >
> > > This becomes really important whenever pgsql gains the ability to use
> > > multiple indexes per table (someone smack me if it can do this now and I
> >
> > SMACK!
>
> You can use multiple indexes per query plan node? IE: if you have
> indexes on a and b, you can use both indexes when you do WHERE a=blah
> and b=foo? That's what I was reffering to...

I think what you are describing doesn't make much sense. On any scan
you are only going to using one index (possibly over several columns).
But while processing a query you might be making use of several indexes
on a table. For example the following query should would fast if
appropiate indexes exist:
select (select col1 from tab order by col1),
(select col2 from tab order by col2)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message weigelt 2003-06-13 21:00:57 Re: Pg_dumpall
Previous Message Ernest E Vogelsinger 2003-06-13 20:53:22 Re: using sequences