How does the planner treat a table function.

From: KÖPFERL Robert <robert(dot)koepferl(at)sonorys(dot)at>
To: pgsql-sql(at)postgresql(dot)org
Subject: How does the planner treat a table function.
Date: 2005-03-14 11:26:16
Message-ID: ED4E30DD9C43D5118DFB00508BBBA76EB1663C@neptun.sonorys.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


Hi,
we have got some tables (uw?) and functions. One function is defined like

get_abc():
SELECT a,b,c from table_x;

What happens if I query something like
SELECT a,b from get_abc() where a=5;
while table_x is rather big?

Will PSQL at first query all records of table_x and then apply a where a=5
OR
will PSQL integrate it to a shorter query?

(In case there will be of course an intex over a to prevent sequential
search)

Browse pgsql-sql by date

  From Date Subject
Next Message pginfo 2005-03-14 11:50:56 Re: lower and unicode
Previous Message Miroslav Šulc 2005-03-14 10:43:01 Re: lower and unicode