Re: disable seqscan

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nick Raj <nickrajjain(at)gmail(dot)com>
Cc: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>, pgsql-general(at)postgresql(dot)org, Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
Subject: Re: disable seqscan
Date: 2011-05-23 14:05:08
Message-ID: 12284.1306159508@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Nick Raj <nickrajjain(at)gmail(dot)com> writes:
>> Andrew Sullivan <ajs(at)crankycanuck(dot)ca> wrote:
>>> It sounds like your index can't actually be used to satisfy your
>>> query. Without seeing the table definition, index definition, and
>>> query, however, it's pretty hard to give you a real answer.

>> explain analyze select * from vehicle_stindex where
>> ndpoint_overlap('(116.4,39.3,2008/02/11 11:11:11),(117.8,39.98,2008/02/13
>> 11:11:11)',stpoint);

>> I have defined a datatype called ndpoint. It works same as contrib/cube
>> code (cube datatype).

Indexes can only be used with WHERE conditions that are of the form
indexed_column operator some_expression
where the operator is one of those belonging to the index's operator
class. You haven't told us what operators you put into the operator
class for this new data type, but in any case the function
ndpoint_overlap is not one of them.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chrishelring 2011-05-23 14:10:36 Using right() in a view
Previous Message Sim Zacks 2011-05-23 13:20:29 Re: Where are plpy.execute python commands issued?