Oracle PipeLined方式究竟能提升多少性能(二)
1J5NDEBQKHBQO8L9V','13834749031',0,'IgGOHBUqOO Ex沭YruyXatWgdvlKgju熄 e F pG VL');
END LOOP;
return ret_table;
END WITH_NOPipelined;
end TEST_PIPELLINED;
/
3 下面我们来看测试结果
3.1 采用非PIPELINED方式执行(嵌套表方式返回)
[sql]
C:\Documents and Settings\Administrator>sqlplus tpcctest/******@102.com
SQL*Plus: Release 10.2.0.4.0 - Production on 星期四 4月 11 16:30:24 2013
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> set timing on
SQL> select count(*) from table(TEST_PIPELLINED.WITH_NOPIPELINED());
COUNT(*)
----------
500000
已用时间: 00: 00: 29.73
SQL> select count(*) from table(TEST_PIPELLINED.WITH_NOPIPELINED());
COUNT(*)
----------
500000
已用时间: 00: 00: 29.75
SQL> quit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options 断开
3.2 采用PIPELINED方式执行
[sql]
C:\Documents and Settings\Administrator>sqlplus tpcctest/******@102.com
SQL*Plus: Release 10.2.0.4.0 - Production on 星期四 4月 11 16:40:03 2013
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> set timing on
SQL> select count(*) from table(TEST_PIPELLINED.WITH_PIPELINED());
COUNT(*)
----------
500000
已用时间: 00: 00: 01.37
SQL> select count(*) from table(TEST_PIPELLINED.WITH_PIPELINED());
COUNT(*)
----------
500000
已用时间: 00: 00: 00.25
SQL> select count(*) from table(TEST_PIPELLINED.WITH_PIPELINED());
COUNT(*)
----------
500000
已用时间: 00: 00: 00.23
SQL> quit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options 断开