Re: Speed of EXCECUTE in PL/PGSQL

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Artur Zając <azajac(at)ang(dot)com(dot)pl>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Speed of EXCECUTE in PL/PGSQL
Date: 2013-03-14 19:39:25
Message-ID: 5142276D.10406@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


On 03/14/2013 03:22 PM, Artur Zając wrote:
>
> Why speed of executing (or planning) some very simple query from
> string in pl/pgsql is dependent from whole query or why “FOR r IN
> EXECUTE q” is significally slower from “FOR r IN query”?
>
>

The whole point of EXECUTE is that it's reparsed and planned each time.
You should expect it to be quite a bit slower, and avoid using EXECUTE
wherever possible.

cheers

andrew

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Kirkwood 2013-03-14 21:37:55 Re: New server setup
Previous Message Merlin Moncure 2013-03-14 19:36:02 Re: Speed of EXCECUTE in PL/PGSQL