Re: will the planner ever use an index when the condition is <> ?

From: Roxanne Reid-Bennett <rox(at)tara-lu(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: will the planner ever use an index when the condition is <> ?
Date: 2011-12-18 20:18:49
Message-ID: 4EEE4AA9.6000406@tara-lu.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 12/18/2011 1:31 PM, Tom Lane wrote:
> If you have a specific case where that's not true, you might consider
> a partial index (CREATE INDEX ... WHERE x <> constant). But the
> details of that would depend a lot on the queries you're concerned
> about. regards, tom lane

Which I had tried in the form of (st_geometrytype(location) <>
'ST_Point'::text)... planner never picked it (for the scenario given
before). But this thread was all pretty much .. design/plan/future use.
This specific instance I've handled with in
("ST_Polygon","ST_MultiPolygon").

Thank you for the feedback.

Roxanne

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Rafael Martinez 2011-12-19 15:04:54 Dramatic change in memory usage with version 9.1
Previous Message Marti Raudsepp 2011-12-18 20:11:28 Re: will the planner ever use an index when the condition is <> ?