Cloudflare的D1使用技巧

无愠色

关注

阅读 22

2024-08-13


  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)

0 0 举报