From: Tom Lane <tgl@sss.pgh.pa.us>
To: SZŰCS Gábor <surrano@mailbox.hu>
Cc: pgsql-performance@postgresql.org
Subject: Re: constant vs function param differs in performance
Date: Fri, 14 Nov 2003 15:59:14 -0500
Message-ID: <5187.1068843554@sss.pgh.pa.us> (raw)
In-Reply-To: <01a601c3aac1$281e72c0$0403a8c0@fejleszt4>
References: <01a601c3aac1$281e72c0$0403a8c0@fejleszt4>
"=?iso-8859-2?B?U1rbQ1MgR+Fib3I=?=" <surrano@mailbox.hu> writes:
> I have two SQL function that produce different times and I can't understand
> why.
The planner often produces different plans when there are constants in
WHERE clauses than when there are variables, because it can get more
accurate ideas of how many rows will be retrieved.
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, surrano@mailbox.hu
Subject: Re: constant vs function param differs in performance
In-Reply-To: <5187.1068843554@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