From: Tom Lane <tgl@sss.pgh.pa.us>
To: pginfo <pginfo@t1.unisoftbg.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Trigger performance
Date: Thu, 22 Jan 2004 10:37:54 -0500
Message-ID: <12241.1074785874@sss.pgh.pa.us> (raw)
In-Reply-To: <400F9955.3C0FD784@t1.unisoftbg.com>
References: <400F9955.3C0FD784@t1.unisoftbg.com>
pginfo <pginfo@t1.unisoftbg.com> writes:
> I was supprised that the pgsql trigger take ~8 sec. to insert this rows
> and the "C" trigger take ~ 17 sec.
The reason is that plpgsql caches the plan for the invoked SELECT,
whereas the way you coded the C function, it's re-planning that SELECT
on every call.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, pginfo@t1.unisoftbg.com
Subject: Re: Trigger performance
In-Reply-To: <12241.1074785874@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox