Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> QEPs on a table with RLS policy

QEPs on a table with RLS policy

From: <steve_mundie_at_my-deja.com>
Date: Wed, 22 Sep 1999 11:38:36 GMT
Message-ID: <7saf3q$2ql$1@nnrp1.deja.com>


I've been looking at the 8i "virtual private database" new functionality and I'm puzzled about how queries against tables with policies are optimised.

I think that my SQL will be changed from ...

   select * from head;
to either...
  select * from head WHERE CMPCODE = 'HQ'; or...
  select * from (SELECT * FROM HEAD WHERE CMPCODE = 'HQ');

But when I look in v$sqltext I see "select * from head;" even though an explain plan shows I'm using an index on head(cmpcode,...).

  SQL> set autotrace on
  SQL> select * from head;

  CMPCODE      DOCCODE     DOCNUM
  ------------            ------------          ------------
  HQ                   INV                1
  HQ                   INV                2

  Execution Plan


     0      SELECT STATEMENT Optimizer=RULE
     1    0   INDEX (RANGE SCAN) OF 'HEAD_U_IND1' (UNIQUE)

How can I see what the SQL looks like in the server rather than how the SQL looks to the client?

Steve Mundie

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Wed Sep 22 1999 - 06:38:36 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US