Re: Can Postgres use an INDEX over an OR?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Віталій Тимчишин <tivv00(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Chris <dmagick(at)gmail(dot)com>, Robert James <srobertjames(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Can Postgres use an INDEX over an OR?
Date: 2009-07-27 14:18:28
Message-ID: 10074.1248704308@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

=?KOI8-U?B?96bUwcymyiD0yc3eydvJzg==?= <tivv00(at)gmail(dot)com> writes:
> Actually what I am talking about is to make OR with UNION (or UNION-like
> because it's a little different depending on input rows uniqueness) as an
> option. All of OR parts can use/not use different strategies (including
> multiple different idexes or hash joins).

AFAICS you're proposing re-inventing the old implementation of OR'd
indexscans. We took that out when we added bitmap scans because it
didn't have any performance advantage over BitmapOr.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Pavel Stehule 2009-07-27 14:22:08 Re: select query performance question
Previous Message Thomas Zaksek 2009-07-27 14:09:12 select query performance question