Re: query optimization

From: Klint Gore <kgore4(at)une(dot)edu(dot)au>
To: Kevin Duffy <KD(at)wrinvestments(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: query optimization
Date: 2008-07-17 23:41:23
Message-ID: 487FD8A3.6080405@une.edu.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)une(dot)edu(dot)au

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sushant Sinha 2008-07-18 01:16:24 Re: [GENERAL] Fragments in tsearch2 headline
Previous Message Alvaro Herrera 2008-07-17 20:48:49 Re: in query variables....