-
Notifications
You must be signed in to change notification settings - Fork 227
Is the count operation for limiting queries necessary? #174
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
Comments
So I actually understand what's going on here from re-reading @ornj's comment on #27.
I have a GIANT database with more than 250 TB of data and this model is mostly flat... Why is that count operation necessary? Can I disable it? |
It's been a long time since I've used this, but the |
Thanks for that, @ornj. Do you know if it is possible for the subselection being counted to be filtered? Like from above, only with some
I guess my question is, can connection fields be filtered? |
Anything is possible when you're defining your own classes. I believe graphene behaves more or less like reference Javascript implementation does and then graphene_sqlalchemy is providing a pretty basic integration. It's querying for everything and filtering / slicing the results in the application layer. For most usages I'm sure this fine. The resolver methods receive an |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics referencing this issue. |
My understanding is that pagination and limiting should be enabled by using the
SQLAlchemyConnectionField
on aConnection
type.Running a query such as,
yields a SQL query without
LIMIT %s, %s
in theSELECT
statement which is suggested to be the case in #27. Specifically, the generated query is,My schema is pretty straight forward,
and my model (while generated) is,
Am I missing a step or is this possibly a bug? I am using graphene-sqlalchemy 2.1.0.
The text was updated successfully, but these errors were encountered: