cardano-graphql icon indicating copy to clipboard operation
cardano-graphql copied to clipboard

Slow responses for utxos_aggregate by address

Open Kartiiyer12 opened this issue 2 weeks ago • 0 comments

What utxos_aggregate for address takes more than one minute for addresses. This is mostly because of the missing on the tx_out table for address column.

Query -

{
  utxos_aggregate(where: {address: {_eq: "addr1qyp37p9528a6wffjxaplmcmtv6huyhg3tny44vr6kuv9hjgrruztg50m5ujnyd6rlh3kke40cfw3zhxft2c84dcct0ysfkfqgg"}}) {
aggregate {
sum {
value
}}
}}

Solution Create the following index - CREATE INDEX IF NOT EXISTS idx_tx_out_address ON tx_out USING hash (address);

Kartiiyer12 avatar Oct 17 '25 15:10 Kartiiyer12