Como testei:
-------
create table xdual ( dummy varchar2(1) primary key) organization index;
insert into xdual values('x');
analyze table xdual compute statistics for table for all indexes for all indexed columns;
------
DECLARE
x NUMBER;
t INTEGER:=DBMS_UTILiTY.get_time;
BEGIN
FOR i
IN 1 .. 100000
LOOP
SELECT 1
INTO x
FROM DUAL;
END LOOP;
dbms_output.put_line(DBMS_UTILITY.get_time-t);
END;
DECLARE
x NUMBER;
t INTEGER:=DBMS_UTILiTY.get_time;
BEGIN
FOR i
IN 1 .. 100000
LOOP
SELECT 1
INTO x
FROM xDUAL;
END LOOP;
dbms_output.put_line(DBMS_UTILITY.get_time-t);
END;
Obtive 228 para a dual e 287 para a xdual.
usando ... sysdate from ... obtive 259 e 317
usando ... sysdate+1 from ... obtive 307 e 358
A oracle optimizou os acessos à dual (talvez pelo uso do novo parser).
No comments:
Post a Comment
Os comentários são moderados.
The comments are moderated.