0

SQ 版本:4.5.4 SQ Eclipse 插件:3.4

我们已经使用 SQ Eclipse 插件检查新的代码违规大约一个月了,一切都很顺利。从昨天开始,我们在分析代码时遇到了一个问题。

它给“同步问题”带来了问题。使用问题查询时出错。我还查看了 eclipse 日志以找到这背后的原因。在 Eclipse 日志中,我看到它在访问 URL 时出现读取超时问题。

http://ipaddress:9000/api/issues/search?resolved=false&pageSize=-1&componentRoots=PROJECT:PROJECTATTRIBUTE&pageIndex=1

当我在浏览器上点击上述 URL 时,大约需要 5 分钟才能得到响应。我检查了声纳日志以找到其背后的根本原因,并注意到执行查询大约需要 5 分钟。下面是声纳日志,我们可以看到执行查询花费了 324913 毫秒。

2015.08.06 23:38:18 INFO http-bio- . . -9000-exec-2 web[http] 329399ms GET /api/issues/search?resolved=false&pageSize=-1&componentRoots=PROJECT:PROJECTATTRIBUTE&pageIndex=1

2015.08.06 23:39:12 INFO http-bio- . .角色=?并且 gr.group_id 为 null ) authorized_projects on authorized_projects.root_project_id = root_snapshot_components.project_id WHERE (project_components.kee=?) and project_components.enabled = 1) authorized_input_components WHERE s.root_project_id = authorized_input_components.root_project_id 和 s.islast = 1 和 (s .root_snapshot_id = authorized_input_components.root_snapshot_id 和 s.path LIKE authorized_input_components.path || authorized_input_components.sid || '.%' ) 或 (s.id = authorized_input_components.sid) ) ) authorizedComponents.project_id=i.component_id 上的 authorizedComponents.project_id=i.component_id WHERE i。分辨率为 null ) where rownum <= ? - 参数是: , , <10000> kee=?) and project_components.enabled = 1 ) authorized_input_components WHERE s.root_project_id = authorized_input_components.root_project_id and s.islast = 1 and ( (s.root_snapshot_id = authorized_input_components.root_snapshot_id and s.path LIKE authorized_input_components.path || authorized_input_components.sid | | '.%' ) 或 (s.id = authorized_input_components.sid) ) ) authorizedComponents.project_id=i.component_id 上的 authorizedComponents WHERE i.resolution 为 null ) where rownum <= ? - 参数是: , , <10000> kee=?) and project_components.enabled = 1 ) authorized_input_components WHERE s.root_project_id = authorized_input_components.root_project_id and s.islast = 1 and ( (s.root_snapshot_id = authorized_input_components.root_snapshot_id and s.path LIKE authorized_input_components.path || authorized_input_components.sid | | '.%' ) 或 (s.id = authorized_input_components.sid) ) ) authorizedComponents.project_id=i.component_id 上的 authorizedComponents WHERE i.resolution 为 null ) where rownum <= ? - 参数是: , , <10000> ) 或 (s.id = authorized_input_components.sid) ) ) authorizedComponents.project_id=i.component_id 上的 authorizedComponents WHERE i.resolution 为 null ) where rownum <= ?- 参数是: , , <10000> ) 或 (s.id = authorized_input_components.sid) ) ) authorizedComponents.project_id=i.component_id 上的 authorizedComponents WHERE i.resolution 为 null ) where rownum <= ?- 参数是: , , <10000>

但是当我在 DB 上或通过 java 程序执行相同的查询时,只需不到 5 秒。

如果有人知道如何解决此问题,请帮助遇到类似问题的每个人。

4

0 回答 0