Description
Most likely is the direct consequence of #3043
After upgrading to 8.11.3 we've started to experience the increased latency for one of our queries:
The graph shows latency at 8.11.2, then 8.11.3 (increased), and then after we rolled back to 8.11.2. No other dependencies were changed. We also use typeorm on top of pg.
This query fetched 1 row but with ~600 columns. All other queries were not affected this much.
We isolated the issue to the query call (pganalyze didn't show any difference in the actual query time, also nothing else was changed in the code).
What we believe is happening: because of the extra loop for pre-building an empty object it adds some execution time.
We've prepared some sample code to showcase the issue: https://gist.github.com/wannabehero/a6531df714041e559a38c97d49f2f444
➜ pg-test node test.js
8.11.3: 164.089ms
8.11.2: 80.921ms
Do you think it's valid? If so, can we get back to having an option to enable this behavior? Like it was in 11955a0
Thanks.