Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

query timeout,need to optimize sql #287

Open
coderbradlee opened this issue Aug 13, 2020 · 0 comments
Open

query timeout,need to optimize sql #287

coderbradlee opened this issue Aug 13, 2020 · 0 comments

Comments

@coderbradlee
Copy link
Contributor

coderbradlee commented Aug 13, 2020

query {
 action{
    byType(type: "execution"){
  exist
    actions(pagination: {skip: 0,first:2}){
      actHash
    blkHash
    timeStamp
    actType
    sender
    recipient
    amount
    gasFee
    }
    count
  }
}
}

need to optimize this sql probably:
SELECT action_hash, block_hash, timestamp, action_type, from, to, amount, gas_price*gas_consumed FROM action_history AS t1 LEFT JOIN (SELECT block_height,block_hash,timestampFROM block_history) t2 ON t1.block_height=t2.block_height WHERE action_type ='execution' ORDER BYtimestamp DESC limit 0,2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant