On Fri, Nov 2, 2018 at 2:34 PM Stephen Frost <sfr...@snowman.net> wrote: > * Merlin Moncure (mmonc...@gmail.com) wrote: > As for what language it's written in- I don't think that matters much. > I'd very much expect it to be more performant to use binary if you're > working in C, of course, but there's no point comparing C-parsed json > into some C structure vs. psycopg2 injesting binary data and building a > Python json object- what matters is if it'd be faster for psycopg2 to > pull in binary-json data and put it into a Python json object, or if > it'd be faster to parse the text-json data and put the result into the > same Python object. In my view, there's something clearly quite wrong > if the text-json data format is faster at that.
Yeah, I figure the language would be C or another language with drivers smart enough to speak the binary protocol. > > In my experience with arrays and composites, you can see significant > > performance reduction and throughput increase in certain classes of > > queries. However, some of the types that were the worst offenders > > (like timestamps) have been subsequently optimized and/or are > > irrelevant to json since they'd be passed as test anyways. > > I've had very good success transferring timestamps as binary, so I'm not > quite sure what you're getting at here. Er, yes, timestamps are much faster in binary -- that is what I'd observed and was the point I was trying to make. They are slightly less faster with recent optimizations but still faster. In the old days I saw as much as +50% throughput binary vs text in certain contrived situations; that may no longer be true today. merlin