Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
ea763355
S
SkyWalking
项目概览
apache
/
SkyWalking
上一次同步 大约 1 年
通知
302
Star
21345
Fork
6091
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
ea763355
编写于
7月 27, 2021
作者:
L
LEE
提交者:
GitHub
7月 27, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Avoid "select *" query (#7372)
上级
7ada0096
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
20 addition
and
3 deletion
+20
-3
CHANGES.md
CHANGES.md
+1
-0
oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2TraceQueryDAO.java
...ap/server/storage/plugin/jdbc/h2/dao/H2TraceQueryDAO.java
+19
-3
未找到文件。
CHANGES.md
浏览文件 @
ea763355
...
...
@@ -120,6 +120,7 @@ Release Notes.
*
Fix PrometheusMetricConverter may throw an
`IllegalArgumentException`
when convert metrics to SampleFamily
*
Filtering NaN value samples when build SampleFamily
*
Add Thread and ClassLoader Metrics for the self-observability and otel-oc-rules
*
Simple optimization of trace sql query statement. Avoid "select
*
" query method
#### UI
...
...
oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2TraceQueryDAO.java
浏览文件 @
ea763355
...
...
@@ -177,7 +177,13 @@ public class H2TraceQueryDAO implements ITraceQueryDAO {
buildLimit
(
sql
,
from
,
limit
);
try
(
ResultSet
resultSet
=
h2Client
.
executeQuery
(
connection
,
"select * "
+
sql
.
toString
(),
parameters
.
toArray
(
new
Object
[
0
])))
{
connection
,
"select "
+
SegmentRecord
.
SEGMENT_ID
+
", "
+
SegmentRecord
.
START_TIME
+
", "
+
SegmentRecord
.
ENDPOINT_NAME
+
", "
+
SegmentRecord
.
LATENCY
+
", "
+
SegmentRecord
.
IS_ERROR
+
", "
+
SegmentRecord
.
TRACE_ID
+
" "
+
sql
,
parameters
.
toArray
(
new
Object
[
0
])))
{
while
(
resultSet
.
next
())
{
BasicTrace
basicTrace
=
new
BasicTrace
();
...
...
@@ -213,8 +219,18 @@ public class H2TraceQueryDAO implements ITraceQueryDAO {
try
(
Connection
connection
=
h2Client
.
getConnection
())
{
try
(
ResultSet
resultSet
=
h2Client
.
executeQuery
(
connection
,
"select * from "
+
SegmentRecord
.
INDEX_NAME
+
" where "
+
SegmentRecord
.
TRACE_ID
+
" = ?"
,
traceId
connection
,
"select "
+
SegmentRecord
.
SEGMENT_ID
+
", "
+
SegmentRecord
.
TRACE_ID
+
", "
+
SegmentRecord
.
SERVICE_ID
+
", "
+
SegmentRecord
.
SERVICE_INSTANCE_ID
+
", "
+
SegmentRecord
.
ENDPOINT_NAME
+
", "
+
SegmentRecord
.
START_TIME
+
", "
+
SegmentRecord
.
END_TIME
+
", "
+
SegmentRecord
.
LATENCY
+
", "
+
SegmentRecord
.
IS_ERROR
+
", "
+
SegmentRecord
.
DATA_BINARY
+
", "
+
SegmentRecord
.
VERSION
+
" from "
+
SegmentRecord
.
INDEX_NAME
+
" where "
+
SegmentRecord
.
TRACE_ID
+
" = ?"
,
traceId
))
{
while
(
resultSet
.
next
())
{
SegmentRecord
segmentRecord
=
new
SegmentRecord
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录