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

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: select single entry and its neighbours using direct-acess to index?
Date: 2004-12-06 21:12:01
Message-ID: 87hdmz168u.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Pierre-Frédéric Caillaud <lists(at)boutiquenumerique(dot)com> writes:

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

It won't use an existing two-column index but you can create an expression
index on array[name,name2] and this expression will use it. It won't work if
either column is NULL though.

--
greg

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew - Supernews 2004-12-06 21:14:01 Re: Index scan vs. Seq scan on timestamps
Previous Message Greg Stark 2004-12-06 21:07:25 Re: When to encrypt