views vs pl/pgsql

From: Tomasz Myrta <jasiek(at)klaster(dot)net>
To: PgSQL Performance ML <pgsql-performance(at)postgresql(dot)org>
Subject: views vs pl/pgsql
Date: 2003-01-06 11:03:19
Message-ID: 3E196277.5020904@klaster.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi
1. I have plpgsql function having only one query returning 1 value. This
query joins some tables. I read, that plpgsql function saves execution
plan for all queries inside one database connection.

2. Instead of this I can create a view returning one row. How does
postgres work with views? When the plan is being created? What happens
to views which don't have explicit joins? What happens if I create index
on tables after creating a view?

Which one is better and when?

Regards,
Tomasz Myrta

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2003-01-06 19:14:50 Re: Question on hardware & server capacity
Previous Message yutaka_inada 2003-01-06 02:27:17 Re: executing pgsql on Xeon-dual machine