Skip to content

Parsing single result with large amount of columns takes more time in 8.11.3 #3055

Open
@wannabehero

Description

@wannabehero

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:
image
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions