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

Fetching fields of connected docs is slow #53

Open
carstenblt opened this issue Nov 14, 2021 · 2 comments
Open

Fetching fields of connected docs is slow #53

carstenblt opened this issue Nov 14, 2021 · 2 comments

Comments

@carstenblt
Copy link

Running the following query takes around 3 seconds:

SalesOrders(first: 10) {
  totalCount
  edges {
    node {
      name
      address_name {
        name
        address_title
        address_line1
        address_line2
        pincode
        city
      }
    }
  }
}

What's especially interesting is, that fetching many subfields (in this case 6 from address_name) is much slower than just fetching a few - so it seems, that the db is queried individually for each subfield, which probably is what makes it so much slower.

Just querying a single subfield of address_name takes around 1 - 1.2 seconds. It's still slow, but bearable.

Not querying subfields at all is around 300 ms. So >700 ms for 10 additional docs is still a lot but I don't know if that can be sped up easily by fetching multiple docs at once. But in this case it would still be faster to send 10 parallel REST queries to the server, which get answered in around 150 ms simultaneously.

@fahimalizain
Copy link
Member

fahimalizain commented Dec 11, 2021

@carstenblt PR #54 which is merged now should improve performance significantly. Can you please test again ?

@e-lobo
Copy link
Member

e-lobo commented Jan 15, 2023

@fahimalizain close this issue please..
@carstenblt things should be significantly faster now..

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

Successfully merging a pull request may close this issue.

3 participants