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

Add handling of multi-root queries latency measurement #43

Open
aasseman opened this issue Jan 11, 2023 · 0 comments · May be fixed by #84
Open

Add handling of multi-root queries latency measurement #43

aasseman opened this issue Jan 11, 2023 · 0 comments · May be fixed by #84

Comments

@aasseman
Copy link
Contributor

aasseman commented Jan 11, 2023

query_timing_ms is only used for the --experimental-model-builder. More precisely, it's used for determining the relative costs (in execution time) of different query shapes. Agora (the Gateway component that applies the indexer pricing), actually prices multi-root queries separately, for example:

query myquery {
  tokens([...]){[...]}
  pairs([...]){[...]}
}

Is split in 2 separate queries to be priced, and would add up the price models for tokens[...] and pairs[...].
The issue is that on the indexer side, the whole query is executed at once, and there is no way for now to determine the separate execution time of each root.
So for now, when we have a multi-root query, AA will just ignore the execution time.
We know that it is very limiting, and that is the reason for the existence of --experimental-model-builder.

Without the --experimental-model-builder, AA will apply a flat pricing model for all queries of each subgraph, and for each subgraph, will continuously optimize the flat price for maximum revenue (GRT/second).

Originally posted by @aasseman in #37 (comment)

@carlosvdr carlosvdr linked a pull request Jul 19, 2023 that will close this issue
@aasseman aasseman linked a pull request Nov 6, 2023 that will close this issue
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.

2 participants