Queries using ORDER BY and LIMIT 1 are slow #174

Closed
opened 2022-07-11 13:19:56 +00:00 by prathamesh0 · 0 comments
prathamesh0 commented 2022-07-11 13:19:56 +00:00 (Migrated from github.com)

Queries where we want to get latest account state / storage use ORDER BY block_number DESC and LIMIT 1 to get the latest result. For eg. RetrieveStorageLeafByAddressHashAndLeafKeyAndBlockHashPgStr

These queries take too long to execute. For eg. A getStorageAt call using the query above didn't complete execution even after 60 sec.

Queries where we want to get latest account state / storage use `ORDER BY block_number DESC` and `LIMIT 1` to get the latest result. For eg. [RetrieveStorageLeafByAddressHashAndLeafKeyAndBlockHashPgStr](https://github.com/vulcanize/ipld-eth-server/blob/v4.0.6-alpha/pkg/eth/ipld_retriever.go#L237) These queries take too long to execute. For eg. A `getStorageAt` call using the query above didn't complete execution even after 60 sec.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/ipld-eth-server#174
No description provided.