Help understanding reads

I have an app with only 1 user, however I usually gets 200k to 300k reads a day. I use graphql for my queries.
Is there a way to get any more granular data? I only get what I spent in a day, but I have no idea which are the queries that are most expensive.
What do you recommend I do to get a better understanding on how expensive each graphql query is?

Thanks!

Hi @santiago.

We are working on providing more metrics through the Dashboard, but that won’t be available for a while yet.

If you create a support ticket at support.fauna.com or by email support@fauna.com, using the email you used to sign up with Fauna, we can take a closer look at your queries with you.

That said, here are also some tips for estimating how many Read Ops you can expect for your queries.

Tips

You said that you only have a single user. It may be that your application is making requests very often, that each query is very expensive, or some combination.

If you have not already, check out our documentation on Billing: Billing - Fauna Documentation. Here, we detail how Ops are charged for your queries.

Note that larger documents cost more, and larger Index pages (e.g. _size is set high) can cost more.

For GraphQL, consider how your GraphQL Schema is translated into Fauna resources, and what it costs to fetch them. Our documentation discusses how we turn your schema into Collections, Indexes, etc: GraphQL schemas - Fauna Documentation

GraphQL queries make it easier to fetch a large set of data and expand its relationships. Consider an AllThings type of query. Fauna requires an Index for this, and that index will have 0 terms. Reading an index with no terms will cost at least 8 Read Ops. Make 10k requests to this Index and that’s 80k Read Ops. On top of that, you want to actually fetch the documents, and that’s one more Read Op (at least) per Document. So, for example, if the Index returns 10 Documents, now our 10k queries are up to 180k Read Ops. Then, if you expand a relationship, that could mean another Index read and more Document reads.

The Dashboard only shows the Ops you have been charged, and does not show how many requests have been made. However, if you understand what kinds of queries you are making, then you can use the Compute Ops to estimate how many queries you have. Every request costs at least 1 Compute Op. If all of your queries are relatively simple, then perhaps your queries on average cost between 1 and 3 Compute Ops. If the Dashboard shows 12k Compute Ops per day, then you can expect that you made 4-12k queries that day.

Hi @ptpaterson , thank you for the detailed response, that helps a lot! I will work on those suggestions and I am looking forward to the more detailed dashboard.

Thank you!

1 Like