Re: select single entry and its neighbours using direct-acess to index?

From: Pierre-Frédéric Caillaud <lists(at)boutiquenumerique(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: select single entry and its neighbours using direct-acess to index?
Date: 2004-12-06 15:51:00
Message-ID: opsilfna03cq72hf@musicbox
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


>> I thought the planner had an automatic rewriter for these situations.
>
> No. There was a prior discussion of this, saying that we really ought
> to support the SQL-spec row comparison syntax:

What I meant was that I thought the planner could rewrite :
(A and C) or (A AND B) as A and (B or C)
which is more index-friendly.

> ... WHERE (name, name2) > ('b', 'a');
> which would map directly onto the semantics of a 2-column index. We
> don't have that functionality yet, though (we take the syntax but the
> semantics are not SQL-compliant) let alone any ability to pass it
> through to a 2-column index.

One could always use ARRAY[name,name2] > ARRAY['b','a']
But it is NOT index-friendly...

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-12-06 15:53:18 Re: Performance tuning on RedHat Enterprise Linux 3
Previous Message Mike Rylander 2004-12-06 15:49:11 Re: DBD::PgSPI 0.02