Skip to content

Instantly share code, notes, and snippets.

@hashware
Created June 22, 2018 05:16
Show Gist options
  • Save hashware/0d2cdbca97c0338000f8ecea63080a78 to your computer and use it in GitHub Desktop.
Save hashware/0d2cdbca97c0338000f8ecea63080a78 to your computer and use it in GitHub Desktop.

删除错误数据

db.eosset.find({"block_num" : {$exists:false}})
db.eosset.remove({"block_num" : {$exists:false}})

创建索引

db.eosset.ensureIndex({"block_num": 1},{unique: true})

db.eosset.ensureIndex({"transactions.trx.transaction.actions.account": 1})

db.eosset.ensureIndex({"transactions.trx.transaction.actions.name": 1})

查看最后一条记录

db.eosset.find().sort({"block_num":,-1}).limit(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment