Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/oracle/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql 解读蟾蜍';s查询时间超过500行_Sql_Oracle_Oracle11g_Toad - Fatal编程技术网

Sql 解读蟾蜍';s查询时间超过500行

Sql 解读蟾蜍';s查询时间超过500行,sql,oracle,oracle11g,toad,Sql,Oracle,Oracle11g,Toad,当我在Toad中执行一个返回500多行的查询时,左下角的毫秒数是表示执行整个查询所用的时间,还是表示获取500行所用的时间 例如,上面的查询返回7000行。整个查询是用了1000毫秒,还是仅仅取500行?默认情况下,Toad只取前500条记录并停止 可以通过跟踪TOAD会话并创建结果跟踪文件的tkprof报告来确认这一点 在我的测试用例中,我创建了一个包含一百万行的表: create table a_million_rows as select rownum as x from du

当我在Toad中执行一个返回500多行的查询时,左下角的毫秒数是表示执行整个查询所用的时间,还是表示获取500行所用的时间


例如,上面的查询返回7000行。整个查询是用了1000毫秒,还是仅仅取500行?

默认情况下,Toad只取前500条记录并停止

可以通过跟踪TOAD会话并创建结果跟踪文件的
tkprof
报告来确认这一点

在我的测试用例中,我创建了一个包含一百万行的表:

 create table a_million_rows as
 select rownum as x
   from dual
connect by level <= 1000000;

这是从打开光标到从中提取第500行的时间。可能在蟾蜍选项中启用了
FIRST\u ROWS
提示。如果确实要获取所有行,请按Ctrl+End。但是,如果您正在测试查询的性能,那么这不是执行查询的方法。
select *
from
 a_million_rows


call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch        1      0.00       0.00          5          4          0         501
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total        3      0.00       0.00          5          4          0         501

Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 93

Rows     Row Source Operation
-------  ---------------------------------------------------
    501  TABLE ACCESS FULL A_MILLION_ROWS (cr=4 pr=5 pw=0 time=0 us cost=35 size=13951951 card=1073227)