如何在 phpmyadmin 中多次运行查询?
我想要一种能够对查询进行 1,000,000 次基准测试的方法。做到这一点最简单的方法是什么?目前,我已经多次搜索发出查询的方法,但没有弹出任何内容。
我还遇到过可以在 mysql 命令行中运行的 benchmark() 命令,但它似乎有一些限制,我似乎无法让它工作。
I want a way to be able to benchmark a query like 1,000,000 times. What's the easiest way to do this? Currently I've searched for a way to issue a query multiple times but nothing pops up.
I've also come across the benchmark() command that can be run in mysql command line, but it seems to have some limitations and I can't seem to get it to work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这实际上并不是 phpMyAdmin 的工作,phpMyAdmin 是一个针对 MySQL 初学者的 GUI。
将查询放入脚本中,循环运行 1,000,000 次。
尽管这并不是一个很好的基准。如果您尝试模拟真实需求,则需要一些并发活动,而不仅仅是一次发出并返回 1,000,000 个查询。
This isn't really the job of phpMyAdmin, a GUI for MySQL beginners.
Put the query in a script, in a loop that runs 1,000,000 times.
Though that's not a very good benchmark of anything. If you're trying to simulate real demand, you need to have some concurrent activity, not just 1,000,000 queries issued and returned one at a time.
我建议从脚本级别进行循环测试,因为这可以更好地满足需求。
i would suggest doing loop test from script level as this would give a better time of the demand.
从 MySQL 文档:
您可以将此代码粘贴到phpmyadmin 的 SQL 选项卡,然后运行它。
From the MySQL Documentation:
You could paste this code in phpmyadmin's SQL tab, then run it.