0
点赞
收藏
分享

微信扫一扫

Cloudflare的D1使用技巧


  1. 总文档:https://developers.cloudflare.com/workers/wrangler/commands/#d1
  2. 查询某个数据库中哪些命令占用资源最大:

To find top 10 queries by execution count:

npx wrangler d1 insights <database_name> --sort-type=sum --sort-by=count --count=10

To find top 10 queries by average execution time:

npx wrangler d1 insights <database_name> --sort-type=avg --sort-by=time --count=10

To find top 10 queries by rows written in last 7 days:

npx wrangler d1 insights <database_name> --sort-type=sum --sort-by=w

举报

相关推荐

0 条评论