From: | bricklen <bricklen(at)gmail(dot)com> |
---|---|
To: | Erik van Zijst <erik(dot)van(dot)zijst(at)gmail(dot)com> |
Cc: | "pgsql-performance(at)postgresql(dot)org list" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Suboptimal query plan when using expensive BCRYPT functions |
Date: | 2014-03-23 03:56:09 |
Message-ID: | CAGrpgQ8Z45DTKeOJb8VdEBKgRpYWk5yOarpF-gWsEO5VD9oZUw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Sat, Mar 22, 2014 at 8:37 PM, Erik van Zijst <erik(dot)van(dot)zijst(at)gmail(dot)com>wrote:
> On Sat, Mar 22, 2014 at 3:56 PM, bricklen <bricklen(at)gmail(dot)com> wrote:
> > On Sat, Mar 22, 2014 at 3:27 PM, Erik van Zijst <
> erik(dot)van(dot)zijst(at)gmail(dot)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?
>
I just reread your previous post about the checks being at potentially
arbitrary depths. In that case, the function may or may not help. Without a
representative database to test with I can't say one way or the other.
Perhaps someone else will have some other ideas of what could be useful
here.
From | Date | Subject | |
---|---|---|---|
Next Message | Venkata Balaji Nagothi | 2014-03-23 06:10:44 | Re: Query taking long time |
Previous Message | Erik van Zijst | 2014-03-23 03:37:28 | Re: Suboptimal query plan when using expensive BCRYPT functions |