On Wed, May 13, 2020 at 12:50 PM Robert Haas <robertmh...@gmail.com> wrote: > > On Mon, May 11, 2020 at 4:42 PM Gurjeet Singh <gurj...@singh.im> wrote: > > That's a good point! It might still be desirable, perhaps for performance > > trade-off of JSON conversion on the client-side instead of on the > > server-side. > > If there's a performance problem with the server's code here, we > should probably try to fix it, instead of adding the same feature on > the client side.
Performance problem is not just about how much CPU/RAM is used on server-side but other resources like network consumption to get the results to the client. Anecdotally, I have heard of a case where Oracle implemented custom Huffman Encoding for a customer to speed up delivery of their resultset that contained just rows of true/false. Arguably, delivering JSON (with its repeating attribute names in every element of the array, dquotes and commas) is more network intensive than converting the resultset to JSON on network side. > But also, we shouldn't start by deciding we need feature X and then > looking for the reason why we need it. That's better than, or at least on par with, the excuses like "We should do it because some other database does it, too" :-) Best regards, -- Gurjeet Singh http://gurjeet.singh.im/