**已关闭。**此问题需要debugging details。它目前不接受回答。
编辑问题以包括desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem。这将有助于其他人回答这个问题。
上个月关门了。
Improve this question的
我的应用程序正在运行一个查询以生成饼图。该查询是一个具有多个连接和count(*)
函数的group by语句。UI有一个运行按钮,用于运行查询并使用查询数据在UI上生成饼图。
在单次运行中,查询大约需要6秒。在快速连续运行2次时,执行时间几乎翻倍(~12秒)。可以观察到,查询时间是没有的倍数。并行运行。问题只出在这个查询上,因为其他没有group by的查询都能很好地工作。
请注意,在并行运行时,每次执行查询所用的时间几乎相同(是运行的倍数)。
这是否是Oracle DB配置的问题?
<TABLE class="TreeTableWidget" border=0 cellpadding=0 cellspacing=0 width=100% bgcolor=#efefef><tr><td>
<!-- ..........................data begin........................... -->
<TABLE class=TreeTableWidget border=0 cellspacing=0 cellpadding=1 align=center width=100%" bgcolor=#ffffff>
<tr class="TableCell">
<td valign=top bgcolor=#bbbbbb> <font color=#444477>OPERATION</font> </td>
<td valign=top bgcolor=#aaaaaa> <font color=#444477>OBJECT_NAME</font> </td>
<td valign=top bgcolor=#bbbbbb> <font color=#444477>OPTIONS</font> </td>
<td valign=top bgcolor=#aaaaaa> <font color=#444477>CARDINALITY</font> </td>
<td valign=top bgcolor=#bbbbbb> <font color=#444477>COST</font> </td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff ><font size=-1><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/gray.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%> SELECT STATEMENT </td></tr></table></font></td>
<td width=11% valign=top bgcolor=#dfdfdf >   </td>
<td width=11% valign=top bgcolor=#dfd5d1 >   </td>
<td width=11% valign=top bgcolor=#dfdfdf > 77 </font></td>
<td width=11% valign=top bgcolor=#dfd5d1 > 28255 </font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff ><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/gray.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%> HASH </td></tr></table></font></td>
<td width=11% valign=top bgcolor=#ffffdf >   </td>
<td width=11% valign=top bgcolor=#ffffd2 > GROUP BY </font></td>
<td width=11% valign=top bgcolor=#ffffdf > 77 </font></td>
<td width=11% valign=top bgcolor=#ffffd2 > 28255 </font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff ><font size=-1><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/table.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%> TABLE ACCESS </td></tr></table></font></td>
<td width=11% valign=top bgcolor=#dfdfdf > LCSSAMPLE </font></td>
<td width=11% valign=top bgcolor=#dfd5d1 > FULL </font></td>
<td width=11% valign=top bgcolor=#dfdfdf > 608891 </font></td>
<td width=11% valign=top bgcolor=#dfd5d1 > 28240 </font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(119,119,0)> Other XML </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(136,0,102)> {info} </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(136,102,0)> info type="has_user_tab" </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(102,136,0)> yes </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(136,102,0)> info type="db_version" </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(102,136,0)> 19.0.0.0 </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(136,102,0)> info type="parse_schema" </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(102,136,0)> "TEST01" </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(136,102,0)> info type="plan_hash_full" </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(102,136,0)> 3197009832 </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(136,102,0)> info type="plan_hash" </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(102,136,0)> 3739428270 </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(136,102,0)> info type="plan_hash_2" </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(102,136,0)> 3197009832 </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(136,102,0)> stats type="compilation" </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(136,102,0)> stat name="bg" </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(102,136,0)> 0 </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(136,102,0)> q o="2" f="y" </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(136,0,102)> {n} </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(102,136,0)> SEL$1 </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(136,0,102)> {t} </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(102,136,0)> LCSSAMPLE </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(102,136,0)> SEL$1 </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(136,0,102)> {hint} </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(102,136,0)> USE_HASH_AGGREGATION(@"SEL$1") </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(102,136,0)> FULL(@"SEL$1" "LCSSAMPLE"@"SEL$1") </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(102,136,0)> OUTLINE_LEAF(@"SEL$1") </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(102,136,0)> ALL_ROWS </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(102,136,0)> DB_VERSION('19.1.0') </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(102,136,0)> OPTIMIZER_FEATURES_ENABLE('18.1.0') </td></tr></table></font></td>
</tr>
<tr>
<td width=45% valign=top bgcolor=#ffffff colspan=5><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=1%><table CELLSPACING=0 cellpadding=0><tr><td> </td><td> </td><td> </td><td> </td><td><IMG SRC="images/minus.gif" wWIDTH=16 hHEIGHT=16 BORDER=0><IMG SRC="images/empty.png" wWIDTH=16 hHEIGHT=16 BORDER=0></td><tr></table></td> <td width=99%><font color=rgb(102,136,0)> IGNORE_OPTIM_EMBEDDED_HINTS </td></tr></table></font></td>
</tr>
</table>
<!-- ..........................data end........................... -->
</td></tr></TABLE>
字符串
1条答案
按热度按时间lskq00tm1#
正如您所怀疑的,这可能是Oracle数据库配置的问题。我以前也经历过一次。
尝试检查配置设置,例如内存分配、并行度和资源限制。以与问题情况匹配并可以优化性能的方式设置这些设置。