Re: sequencial scans - Mailing list pgsql-general

From Tom Lane
Subject Re: sequencial scans
Date
Msg-id 1496.994293171@sss.pgh.pa.us
Whole thread Raw
In response to sequencial scans  ("Vilson farias" <vilson.farias@digitro.com.br>)
List pgsql-general
"Vilson farias" <vilson.farias@digitro.com.br> writes:
> persona=# explain select * from teste_erro where cod = teste_proc('3138414411','19');
> NOTICE:  QUERY PLAN:
> Seq Scan on teste_erro  (cost=0.00..25.00 rows=10 width=4)
> EXPLAIN

You need to mark the function cachable, else the planner doesn't
believe it's a constant.  See "iscachable" in the CREATE FUNCTION
reference page.

            regards, tom lane

pgsql-general by date:

Previous
From: Martín Marqués
Date:
Subject: Re: TODO item
Next
From: CD Baby
Date:
Subject: PostgreSQL ports post-installation gives core dump?