Re: Migration from DB2 to PostgreSQL - Mailing list pgsql-general

From Chris Angelico
Subject Re: Migration from DB2 to PostgreSQL
Date
Msg-id CAPTjJmrMSFXjWDpj2HLxMAj87+N9zZcp8dMAjkoBinugdhH1tQ@mail.gmail.com
Whole thread Raw
In response to Re: Migration from DB2 to PostgreSQL  (Amit Langote <amitlangote09@gmail.com>)
Responses Re: Migration from DB2 to PostgreSQL  (Amit Langote <amitlangote09@gmail.com>)
List pgsql-general
On Thu, Jun 20, 2013 at 11:10 AM, Amit Langote <amitlangote09@gmail.com> wrote:
> If this particular function is to be used repeatedly in a single
> query, would the cost of having a wrapper function around the original
> function be too large? For example, if this function appears in a
> WHERE clause against a table containing millions of rows.

If your wrapper function is written in SQL and is trivial (eg ignore
the third parameter and pass the other two on), the planner should be
able to optimize right through it. Best way to find out is with
EXPLAIN, which I've been using a good bit lately. The optimizer's
pretty smart.

ChrisA


pgsql-general by date:

Previous
From: Amit Langote
Date:
Subject: Re: Migration from DB2 to PostgreSQL
Next
From: Amit Langote
Date:
Subject: Re: Migration from DB2 to PostgreSQL