Re: A performance issue with Memoize
От | David Rowley |
---|---|
Тема | Re: A performance issue with Memoize |
Дата | |
Msg-id | CAApHDvpjnoUE=+MwUG7dBVrnpk0441n-O+-Oqe8R4bSi3r8qTA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: A performance issue with Memoize (Richard Guo <guofenglinux@gmail.com>) |
Список | pgsql-hackers |
On Fri, 26 Jan 2024 at 19:03, Richard Guo <guofenglinux@gmail.com> wrote: > At first I wondered if we should assume that the same param expr must > have the same equality operator. If not, we should also check the > operator to tell if the cache key is a duplicate, like > > - if (!list_member(*param_exprs, expr)) > + if (!list_member(*param_exprs, expr) || > + !list_member_oid(*operators, hasheqoperator)) hmm, if that were the case you wouldn't do it that way. You'd need to forboth() and look for an item in both lists matching the search. > But after looking at how rinfo->left_hasheqoperator/right_hasheqoperator > is set, it seems we can assume that: the operator is from the type cache > entry which is fetched according to the expr datatype. Yip. > So I think the patch makes sense. +1. Thanks for reviewing. I've pushed the patch. David
В списке pgsql-hackers по дате отправления: