Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

"Join" where result would have been a big data set throws an error (performance) #5204

Closed
seromenho opened this issue May 11, 2022 · 1 comment

Comments

@seromenho
Copy link

Describe the bug
Executing

await prisma.a.findMany({
      where: {
        name: '40k records',
      },
      select: {
        B: true,
        C: true,
        D: true,
        E: true,
        F: true,
        G: true
      }
    })

Where table A will return > 20K rows throws an error

      Can't reach database server at `localhost`:`5432`

    Please make sure your database server is running at `localhost`:`5432`.

To Reproduce
Created a repo here: https://github.com/seromenho/prisma-join-performance
Failing test here: https://github.com/seromenho/prisma-join-performance/runs/6396987212?check_suite_focus=true

Expected behavior
Should not throw an error and execute the query.
Meanwhile it's not resolved even the error message might be improved as I suspect the reason is that it can't connect but instead related to the length of the queries.

Screenshots
If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • Connector: PostgreSQL 14.2
  • Prisma: 3.14.0
  • Prisma client: 3.14.0

Additional context
Could be related to #4744 and a query optimisation can also resolve this

@seromenho
Copy link
Author

Closing this as I've realised I've opened in prisma1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant