Nick Raj <nickrajjain@xxxxxxxxx> writes: >> Andrew Sullivan <ajs@xxxxxxxxxxxxxxx> 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 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general