Re: Suboptimal query plan when using expensive BCRYPT functions - Mailing list pgsql-performance

From Erik van Zijst
Subject Re: Suboptimal query plan when using expensive BCRYPT functions
Date
Msg-id CA+69USuaMfzAYa=YWpyJ-SRGLtrpBzCLVoZXRgh0yMvm4KvmeA@mail.gmail.com
Whole thread Raw
In response to Re: Suboptimal query plan when using expensive BCRYPT functions  (bricklen <bricklen@gmail.com>)
Responses Re: Suboptimal query plan when using expensive BCRYPT functions
List pgsql-performance
On Sat, Mar 22, 2014 at 3:56 PM, bricklen <bricklen@gmail.com> wrote:
> On Sat, Mar 22, 2014 at 3:27 PM, Erik van Zijst <erik.van.zijst@gmail.com>
>> I could nonetheless take a stab at it, but life would certainly be
>> easier if I could translate each component independently and leave
>> optimization to the query planner.
>
> How about encapsulating the revised query inside a db function? That
> simplifies the query for your query generator to something like "select
> x,y,z from your_func(p_user,p_email,p_crypt)"

I'm not really sure I understand how a db function would make things
easier. What would the implementation for your_func() be and what
would the SQL look like for the DSL example which contains multiple
password checks?

Cheers,
Erik


pgsql-performance by date:

Previous
From: bricklen
Date:
Subject: Re: Suboptimal query plan when using expensive BCRYPT functions
Next
From: bricklen
Date:
Subject: Re: Suboptimal query plan when using expensive BCRYPT functions