PARALLEL Example The following statement creates a table using an optimum number of parallel execution servers to scan employees and to populate dept_80:
CREATE TABLE dept_80 PARALLEL AS SELECT * FROM employees WHERE department_id = 80;
Using parallelism speeds up the creation of the table, because the database uses parallel execution servers to create the table. After the table is created, querying the table is also faster, because the same degree of parallelism is used to access the table.
NOPARALLEL Example The following statement creates the same table serially. Subsequent DML and queries on the table will also be serially executed.
CREATE TABLE dept_80 AS SELECT * FROM employees WHERE department_id = 80; 今天看了这段文档,大意就是parallel表的建立和查询应该都比非parallex的快.
可我测试了下:
SQL> create table table_parallel parallel as select * from dba_objects;
Table created
Executed in 16.453 seconds
SQL> create table table_normal as select * from dba_objects;
Table created
Executed in 2.765 seconds
SQL> select count(*) from table_parallel;
COUNT(*)
----------
50111
Executed in 1.079 seconds
SQL> select count(*) from table_normal;
COUNT(*)
----------
50112
Executed in 0.656 seconds
SQL> select * from table_parallel where object_id=455;
OWNER OBJECT_NAME SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP STATUS TEMPORARY GENERATED SECONDARY
------------------------------ -------------------------------------------------------------------------------- ------------------------------ ---------- -------------- ------------------- ----------- ------------- ------------------- ------- --------- --------- ---------
SYS SYS_LOB0000000454C00002$$ 455 455 LOB 2006-2-3 下午 2006-2-3 下午 0 2006-02-03:21:20:48 VALID N Y N
Executed in 0.797 seconds
SQL> select * from table_normal where object_id=455;
OWNER OBJECT_NAME SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP STATUS TEMPORARY GENERATED SECONDARY
------------------------------ -------------------------------------------------------------------------------- ------------------------------ ---------- -------------- ------------------- ----------- ------------- ------------------- ------- --------- --------- ---------
SYS SYS_LOB0000000454C00002$$ 455 455 LOB 2006-2-3 下午 2006-2-3 下午 0 2006-02-03:21:20:48 VALID N Y N
Executed in 0.047 seconds
无论创建还是查询都是非parallex表快,不知啥原因,各位高手请解答下.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13387766/viewspace-495574/,如需转载,请注明出处,否则将追究法律责任。