Re: index on a box

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dustin Sallings <dustin+postgres(at)spy(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: index on a box
Date: 2001-06-21 22:26:19
Message-ID: 22953.993162379@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dustin Sallings <dustin+postgres(at)spy(dot)net> writes:
> create function box(point) returns box as
> 'select box($1, $1)'
> language 'sql';

> misc=# explain select * from tmp where box(point(-121, 37)) @ b;
> NOTICE: QUERY PLAN:

> Seq Scan on tmp (cost=0.00..2653.01 rows=61 width=92)

You'd better declare the function as 'iscachable'. As is, the planner
doesn't trust it to return a constant.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Trond Eivind =?iso-8859-1?q?Glomsr=F8d?= 2001-06-21 22:29:15 Re: postgres 7.0.3 with SuSE 7.1
Previous Message Dustin Sallings 2001-06-21 22:22:42 Re: index on a box