Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL variables break ndc-postgres execution plan #10578

Open
arjunyel opened this issue Oct 28, 2024 · 0 comments
Open

GraphQL variables break ndc-postgres execution plan #10578

arjunyel opened this issue Oct 28, 2024 · 0 comments
Labels
c/v3-ndc-postgres Data connector for PostgreSQL k/v3-bug Bug affecting Hasura v3 (DDN) ndc-postgres

Comments

@arjunyel
Copy link
Contributor

Component

c/v3-ndc-postgres

What is the current behaviour?

Connector execution plan when there is GraphQL variables always looks something like this

Aggregate  (cost=0.02..0.03 rows=1 width=32)
  ->  Aggregate  (cost=0.00..0.01 rows=1 width=32)
        ->  Result  (cost=0.00..0.00 rows=0 width=158)
              One-Time Filter: false

What is the expected behaviour?

Aggregate  (cost=14967.53..14967.54 rows=1 width=32)
  ->  Aggregate  (cost=14967.51..14967.52 rows=1 width=32)
        ->  Nested Loop Left Join  (cost=14964.48..14967.50 rows=1 width=158)
              ->  Nested Loop Left Join  (cost=4.21..7.20 rows=1 width=126)
                    ->  Nested Loop Left Join  (cost=1.17..4.13 rows=1 width=94)

...etc

How to reproduce the issue?

  1. Do a ndc-postgres query using Graphql variables and check connector execution plan such as
query getGroup($id: Text!) {
  groupById(id: $id) {
    id
  }
}
  1. Do a query without variable such as
query getGroup {
  groupById(id: "test") {
    id
  }
}

Screenshots or Screencast

Please provide any traces or logs that could help here.

1da2a28302891f9e5aa3ed9314f9f82b

vs

91f1667942a862e139df6c5c4894426d

Any possible solutions/workarounds you're aware of?

Keywords

Traces postgres query execution plan analyze

@arjunyel arjunyel added the k/v3-bug Bug affecting Hasura v3 (DDN) label Oct 28, 2024
@codedmart codedmart added c/v3-ndc-postgres Data connector for PostgreSQL ndc-postgres labels Nov 20, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/v3-ndc-postgres Data connector for PostgreSQL k/v3-bug Bug affecting Hasura v3 (DDN) ndc-postgres
Projects
None yet
Development

No branches or pull requests

2 participants