Re: Understanding sequential versus index scans.

From: John R Pierce <pierce(at)hogranch(dot)com>
To: Robert James <srobertjames(at)gmail(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Understanding sequential versus index scans.
Date: 2009-07-19 23:48:07
Message-ID: 4A63B0B7.4030109@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Robert James wrote:
> Hi. I notice that when I do a WHERE x, Postgres uses an index, and
> when I do WHERE y, it does so as well, but when I do WHERE x OR y, it
> doesn't. Why is this so? And how can I shut this off?

maybe its because you have no index on (X OR Y) ? or maybe because the
analyzer thinks that X or Y includes enough rows that a sequential scan
is more effective ?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2009-07-19 23:56:09 Re: timestamp with time zone tutorial
Previous Message Tom Lane 2009-07-19 23:47:40 Re: Understanding sequential versus index scans.