1.原sql
| SQL | 执行次数 | 平均I_O | 总I_O | 逻辑写 | 逻辑读 | CPU平均耗时 | 总CPU耗时_秒 | 优化建议 |
| 0 AND IsOffShelf = 0; | 627 | 1795 | 1125524 | 913 | 1124611 | 57 | 36184 | 过多的CharSplitForIn,建议慎重判断数量适当用IN明确值的模式 |
2.Erp系统对应位置

3.代码最后提交记录

1.原sql
| SQL | 执行次数 | 平均I_O | 总I_O | 逻辑写 | 逻辑读 | CPU平均耗时 | 总CPU耗时_秒 | 优化建议 |
| 0 AND IsOffShelf = 0; | 627 | 1795 | 1125524 | 913 | 1124611 | 57 | 36184 | 过多的CharSplitForIn,建议慎重判断数量适当用IN明确值的模式 |
2.Erp系统对应位置

3.代码最后提交记录

1.原sql
| SQL | 执行次数 | 平均I_O | 总I_O | 逻辑写 | 逻辑读 | CPU平均耗时 | 总CPU耗时_秒 | 优化建议 |
| (@CustomerID int,@OrderSourceSKU varchar(max) ,@OrderSourceID varchar(max) ,@SKU varchar(max) )SELECT ID, CustomerID, OrderSourceSKUID, OrderSourceID, OrderSourceSKU, SKU, msaleNum, todaysaleNum, ThreeMonthSaleNum, zsaleNum, qsaleNum, sqsaleNum, WeekSaleNum, TwoWeekSaleNum, lastmsaleNum, FirstLegShippingType FROM dbo.RB_Amazon_Product_Base(NOLOCK) WHERE CustomerID = @CustomerID AND OrderSourceSKU IN ( SELECT item FROM CharSplitForIn(@OrderSourceSKU, ',') ) AND OrderSourceID IN ( SELECT item FROM CharSplitForIn(@OrderSourceID, ',') ) AND SKU IN ( SELECT item FROM CharSplitForIn(@SKU, ',') ) AND OrderSourceSKUID > 0 AND IsOffShelf = 0; | 627 | 1795 | 1125524 | 913 | 1124611 | 57 | 36184 | 过多的CharSplitForIn,建议慎重判断数量适当用IN明确值的模式 |
2.Erp系统对应位置

3.代码最后提交记录

002-
002+
003-SQL
003+ SQL
004-执行次数
004+ 执行次数
005-平均I_O
005+ 平均I_O
006-总I_O
006+ 总I_O
007-逻辑写
007+ 逻辑写
008-逻辑读
008+ 逻辑读
009-CPU平均耗时
009+ CPU平均耗时
010-总CPU耗时_秒
010+ 总CPU耗时_秒
011-优化建议
011+ 优化建议
012-0 AND IsOffShelf = 0;
012+ 0 AND IsOffShelf = 0;
013-627
013+ 627
014-1795
014+ 1795
015-1125524
015+ 1125524
016-913
016+ 913
017-1124611
017+ 1124611
018-57
018+ 57
019-36184
019+ 36184
020-过多的CharSplitForIn,建议慎重判断数量适当用IN明确值的模式
020+ 过多的CharSplitForIn,建议慎重判断数量适当用IN明确值的模式
021-
021+
023-<img src="/zentao/file-read-316571.png" alt="" />
023+
026-<img src="/zentao/file-read-316573.png" alt="" />
026+
002-<p>
002+ <p><br /></p>
003-</p><table cellspacing="0" cellpadding="0" border="0" class="ke-zeroborder"><tbody><tr><td class="s-3" style="font-weight:bold;color:#000000;font-size:10pt;font-family:Arial;vertical-align:bottom;">SQL</td>
003+ <table cellspacing="0" cellpadding="0" border="0" class="ke-zeroborder"><tbody><tr><td class="s-3" style="font-weight:bold;color:#000000;font-size:10pt;font-family:Arial;vertical-align:bottom;">SQL</td>
004-<td class="s-3" style="font-weight:bold;color:#000000;font-size:10pt;font-family:Arial;vertical-align:bottom;">执行次数</td>
004+ <td class="s-3" style="font-weight:bold;color:#000000;font-size:10pt;font-family:Arial;vertical-align:bottom;">执行次数</td>
005-<td class="s-81" style="font-weight:bold;">平均I_O</td>
005+ <td class="s-81" style="font-weight:bold;">平均I_O</td>
006-<td class="s-81" style="font-weight:bold;">总I_O</td>
006+ <td class="s-81" style="font-weight:bold;">总I_O</td>
007-<td class="s-81" style="font-weight:bold;">逻辑写</td>
007+ <td class="s-81" style="font-weight:bold;">逻辑写</td>
008-<td class="s-81" style="font-weight:bold;">逻辑读</td>
008+ <td class="s-81" style="font-weight:bold;">逻辑读</td>
009-<td class="s-81" style="font-weight:bold;">CPU平均耗时</td>
009+ <td class="s-81" style="font-weight:bold;">CPU平均耗时</td>
010-<td class="s-81" style="font-weight:bold;">总CPU耗时_秒</td>
010+ <td class="s-81" style="font-weight:bold;">总CPU耗时_秒</td>
011-<td class="s-85" style="font-weight:bold;background-color:#92D04F;">优化建议</td>
011+ <td class="s-85" style="font-weight:bold;background-color:#92D04F;">优化建议</td>
012-</tr><tr><td class="s-79" style="color:#000000;font-size:10pt;font-family:Arial;background-color:#F2C150;vertical-align:bottom;"> 0 AND IsOffShelf = 0;</td>
012+ </tr><tr><td class="s-79" style="color:#000000;font-size:10pt;font-family:Arial;background-color:#F2C150;vertical-align:bottom;">0 AND IsOffShelf = 0;</td>
013-<td class="s-79" style="color:#000000;font-size:10pt;font-family:Arial;background-color:#F2C150;vertical-align:bottom;">627</td>
013+ <td class="s-79" style="color:#000000;font-size:10pt;font-family:Arial;background-color:#F2C150;vertical-align:bottom;">627</td>
014-<td class="s-77" style="background-color:#F2C150;">1795</td>
014+ <td class="s-77" style="background-color:#F2C150;">1795</td>
015-<td class="s-77" style="background-color:#F2C150;">1125524</td>
015+ <td class="s-77" style="background-color:#F2C150;">1125524</td>
016-<td class="s-77" style="background-color:#F2C150;">913</td>
016+ <td class="s-77" style="background-color:#F2C150;">913</td>
017-<td class="s-77" style="background-color:#F2C150;">1124611</td>
017+ <td class="s-77" style="background-color:#F2C150;">1124611</td>
018-<td class="s-77" style="background-color:#F2C150;">57</td>
018+ <td class="s-77" style="background-color:#F2C150;">57</td>
019-<td class="s-77" style="background-color:#F2C150;">36184</td>
019+ <td class="s-77" style="background-color:#F2C150;">36184</td>
020-<td class="s-77" style="background-color:#F2C150;">过多的CharSplitForIn,建议慎重判断数量适当用IN明确值的模式</td>
020+ <td class="s-77" style="background-color:#F2C150;">过多的CharSplitForIn,建议慎重判断数量适当用IN明确值的模式</td>
021-</tr></tbody></table><p><br /></p>
021+ </tr></tbody></table><p><br /></p>
023-<p><img src="/zentao/file-read-316571.png" alt="" /></p>
023+ <p><img src="{316571.png}" alt="" /></p>
026-<p><img src="/zentao/file-read-316573.png" alt="" /></p>
026+ <p><img src="{316573.png}" alt="" /></p>

| 所属迭代 | 技术研发中心 11月运维事项(2023年) |
|---|---|
| 所属模块 | / |
| 相关需求 | dbo.RB_Amazon_Product_Base优化 |
| 指派给 | Closed 于 2023-11-24 10:32:04 |
| 任务类型 | 后端 |
| 任务标签 | 初始 |
| 开发组 | 运营开发组 |
| 任务状态 | 已关闭 |
| 进度 | 100% |
| 优先级 | P3 |
| 关键词 | |
| 抄送给 |
| 由谁创建 | 王翔宇 于 2023-11-13 15:20:01 |
|---|---|
| 由谁完成 | 胡林峰 于 2023-11-17 13:37:44 |
| 由谁取消 | 暂无 |
| 由谁关闭 | 周杰 于 2023-11-24 10:32:04 |
| 关闭原因 | 已完成 |
| 最后编辑 | 周杰 于 2023-11-24 10:32:04 |
| 团队 | 最初预计 | 总计消耗 | 预计剩余 |
|---|
| 最初预计 | 3工时 |
|---|---|
| 总计消耗 | 3工时 |
| 预计剩余 | 0工时 |
| 预计开始 | 2023-11-16 |
| 实际开始 | 2023-11-17 |
| 截止日期 | 2023-11-17 |