Re: jsonb contains behaviour weirdness

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: jsonb contains behaviour weirdness
Дата
Msg-id 1274.1410805794@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: jsonb contains behaviour weirdness  (Peter Geoghegan <pg@heroku.com>)
Ответы Re: jsonb contains behaviour weirdness  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
Peter Geoghegan <pg@heroku.com> writes:
> On Mon, Sep 15, 2014 at 11:12 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Personally I'd think that we should retain it for objects; Peter's
>> main argument against that was that the comment would be too complicated,
>> but that seems a bit silly from here.

> I just don't see any point to it. My argument against the complexity
> of explaining why the optimization is only used with objects is based
> on the costs and the benefits. I think the benefits are very close to
> nil.

It might be that the benefit is very close to nil; that would depend a lot
on workload, so it's hard to be sure.  I'd say though that the cost is
also very close to nil, in the sense that we're considering two additional
compare-and-branch instructions in a function that will surely expend
hundreds or thousands of instructions if there's no such short-circuit.

I've certainly been on the side of "that optimization isn't worth its
keep" many times before, but I don't think the case is terribly clear cut
here.  Since somebody (possibly you) thought it was worth having to begin
with, I'm inclined to follow that lead.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: jsonb contains behaviour weirdness
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: jsonb contains behaviour weirdness