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

Known limitation relating to Epoch querying #52

Closed
rhyslbw opened this issue Oct 29, 2019 · 1 comment · Fixed by #123
Closed

Known limitation relating to Epoch querying #52

rhyslbw opened this issue Oct 29, 2019 · 1 comment · Fixed by #123
Labels

Comments

@rhyslbw
Copy link
Contributor

rhyslbw commented Oct 29, 2019

Currently querying epochs using an order_by argument performs poorly due since the nature of the database design is not optimised for read performance.

{
  epochs(limit: 5, order_by: { number: desc }) {
    ...
  }
}

Instead, the recommended approach is to get the current epoch:

{
  cardano {
    currentEpoch
  }
}

then select the epochs by number (eg latest from the above query is 35):

{
 epochs(where: { number: { in: [35,34,33,32,31]}}) {
    ...
  }
}
@rhyslbw rhyslbw changed the title Document known limitation relating to Epoch querying Known limitation relating to Epoch querying Jan 14, 2020
@rhyslbw rhyslbw added the BUG label Jan 14, 2020
@rhyslbw
Copy link
Contributor Author

rhyslbw commented Jan 14, 2020

input-output-hk/cardano-explorer#188 will resolve this

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