Re: GiST, Not Using Index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Itai Zukerman <zukerman(at)math-hat(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: GiST, Not Using Index
Date: 2003-02-27 22:38:43
Message-ID: 29842.1046385523@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Itai Zukerman <zukerman(at)math-hat(dot)com> writes:
>> Never leave out the "unimportant" stuff --- that's usually where you
>> went wrong ;-)

> OK, I've attached below the SQL I use to generate stuff and an
> interactive session with the "explain" etc.

Ah. Your problem is you need to mark sig_in() as IMMUTABLE, or at least
STABLE, for an expression involving sig_in() to be considered safe to
index. If it's in C, more than likely it'd best be marked STRICT too
(else you'd better have explicit NULL checks in the function code).

Don't forget to look at your other custom functions too, to see if
they're correctly marked.

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Itai Zukerman 2003-02-27 23:12:35 Re: GiST, Not Using Index
Previous Message Stephan Szabo 2003-02-27 22:04:36 Re: pgsql problem