当通过应用程序服务器与MySQL终端运行时,为什么查询会慢慢运行?

发布于 2025-02-13 10:19:39 字数 262 浏览 2 评论 0原文

后端体系结构:Spring-Boot应用程序 + Nodejs Server + Azure Mariadb服务器。 Nodejs服务器用于快速提供来自DB的数据,以初始同步应用程序。

它的工作正常,但是最近,对于某些用户来说,很少有60到90秒的疑问。我尝试在Prod DB的副本上重现它,但结果很快(< 1或2秒)。

此外,我尝试通过终端直接在DB服务器上分析查询,该终端返回结果< 1秒

即使在终端快速上,查询即使在服务器中慢速运行的原因可能是什么?

Back-end architecture: Spring-boot Application + nodeJS server + Azure Mariadb server. The nodeJS server is used to quickly provide data from the DB for initial syncing of the application.

It had been working fine but lately, few queries for certain users take over 60 to 90 seconds. I tried reproducing it on a copy of prod DB but I got the results pretty fast (< 1 or 2 seconds).

Further I tried profiling the query directly on the db server through terminal which returned results in < 1 sec.

What could be the reason for the queries to run slow through the server even when fast on terminal?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文