Skip site navigation (1) Skip section navigation (2)

Re: for/loop performance in plpgsql ?

From: Federico /* juri */ Pedemonte <fepede(at)inwind(dot)it>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: for/loop performance in plpgsql ?
Date: 2002-11-19 09:49:26
Message-ID: 20021119094926.GA786@stealth.fepede.org (view raw or flat)
Thread:
Lists: pgsql-performance
On Tue, Nov 19, 2002 at 12:23:56AM -0500, Tom Lane wrote:
> > result record;
> 
> > for result in select rai, tem
> >                 from data
> >                 where (codice LIKE cod_staz and
> >                 ora > orain and
> >                 ora <= orafin) loop
> 
> Which of these names are columns of the selected tables, and which ones
> are plpgsql variables?

rai, tem, codice, ora 	are columns name
cod_staz, orain, orafin are plpgsql variables

> The planner has to fall back to default selectivity estimates when it's
> looking at queries involving plpgsql variables (since it can't know
> their actual values in advance).  I suspect your problem is related to
> an inaccurate default estimate.

mmm... does it mean that i can't do anything about that ? 


In response to

Responses

pgsql-performance by date

Next:From: Rod TaylorDate: 2002-11-19 13:46:39
Subject: Re: [HACKERS] Question regarding effects of Vacuum, Vacuum
Previous:From: Tom LaneDate: 2002-11-19 05:23:56
Subject: Re: for/loop performance in plpgsql ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group