Para solucionar este problema, podemos modificar la tabla DUAL y hacer referencia a la tabla X$DUAL. Esta tabla es una tabla virtual, lo cual no implica ningún LIO.
Ejemplo:
$ sqlplus "/as sysdba"
SQL_9iR2> SET AUTOTRACE TRACEONLY STATISTICS
SQL_9iR2> SELECT * FROM dual ;
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
3 consistent gets
0 physical reads
0 redo size
402 bytes sent via SQL*Net to client
504 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
SQL_9iR2> SELECT * FROM x$dual ;
ADDR INDX INST_ID D
-------- ---------- ---------- -
0A8A90D8 0 1 X
SQL_9iR2> CREATE VIEW fast_dual AS
2 SELECT 'X' dummy FROM x$dual ;
View created.
SQL_9iR2> GRANT SELECT ON fast_dual TO PUBLIC ;
Grant succeeded.
SQL_9iR2> CONN algun_esquema/algun_password ;
SQL_algun_esquema> CREATE SYNONYM dual FOR sys.fast_dual ;
Synonym created.
SQL_algun_esquema> SET AUTOTRACE TRACEONLY STATISTICS
SQL_algun_esquema> SELECT * FROM dual ;
1 row selected.
Statistics
---------------------------------------------------
0 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
326 bytes sent via SQL*Net to client
498 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
En 10gR2 se soluciona este problema ya que se modificó la tabla DUAL existente y ahora se hace uso de la tabla virtual X$DUAL.
No hay comentarios.:
Publicar un comentario