From: Klint Gore <kgore4@une.edu.au>
To: Kevin Duffy <KD@wrinvestments.com>
Cc: pgsql-general@postgresql.org
Subject: Re: query optimization
Date: Fri, 18 Jul 2008 09:41:23 +1000
Message-ID: <487FD8A3.6080405@une.edu.au> (raw)
In-Reply-To: <DFC309C8A42633419600522FA8C4AE1A560DB4@mail-01.wrcapital.corp>
References: <DFC309C8A42633419600522FA8C4AE1A560DB4@mail-01.wrcapital.corp>
Kevin Duffy wrote:
>
> So here are the questions for the PSQL gurus:
>
> Is getsectypekey(‘CFD’) executing for every join (or possible join)
> between positions_gsco and security?
>
> Causing a scan of security for every possible join.
>
> Does ‘ (select getsectypekey('CFD') ) ‘ cause the getsectype()
> function to be executed once and thus
>
> allowing the index on security to be used.
>
> And of couse ‘5’ makes things simple. The index on security is used.
>
> Am I posting this in the right. If not please help me correct my error
> and point me to the correct spot.
>
Is the function stable or volatile?
As Scott Marlowe suggested, you need to look at the explain results to
find out what the plan is in each case.
klint.
--
Klint Gore
Database Manager
Sheep CRC
A.G.B.U.
University of New England
Armidale NSW 2350
Ph: 02 6773 3789
Fax: 02 6773 3266
EMail: kgore4@une.edu.au
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-general@postgresql.org
Cc: kgore4@une.edu.au, KD@wrinvestments.com
Subject: Re: query optimization
In-Reply-To: <487FD8A3.6080405@une.edu.au>
* 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