FILTER access path..

Hi ,
I have read a section in Performance Tuning e-book regarding the "Use of EXISTS versus IN for Subqueries".
In this section an example with its explain plan is posed....
SELECT
e.employee_id, e.first_name, e.last_name, e.salary
FROM employees e
WHERE EXISTS (SELECT 1 FROM orders o
WHERE e.employee_id = o.sales_rep_id
AND o.customer_id = 144);
ID OPERATION OPTIONS OBJECT_NAME OPT COST
0 SELECT STATEMENT CHO
1 FILTER
2 TABLE ACCESS FULL EMPLOYEES ANA 155
3 TABLE ACCESS BY INDEX ROWID ORDERS ANA 3
4 INDEX RANGE SCAN ORD_CUSTOMER_IX ANA 1As this type of access path is not described , at least in this section, can somebody describe when is this used....????
NOTE: I use Oracle10g. v2
Thank you....
Sim

It does say "The plan requires a full table scan of the employees table, returning many rows. Each of these rows is then filtered against the orders table (through an index)." The FILTER operation consists of working through one set of rows performing some test against it, in this case an index lookup.
I'm a little surprised at those examples though. In 11g (using the predefined "OE" demo schema) I get the same plan for both versions:
| Id  | Operation                      | Name            | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT               |                 |     3 |    90 |     5  (20)| 00:00:01 |
|   1 |  NESTED LOOPS                  |                 |       |       |            |          |
|   2 |   NESTED LOOPS                 |                 |     3 |    90 |     5  (20)| 00:00:01 |
|   3 |    SORT UNIQUE                 |                 |     3 |    21 |     2   (0)| 00:00:01 |
|*  4 |     TABLE ACCESS BY INDEX ROWID| ORDERS          |     3 |    21 |     2   (0)| 00:00:01 |
|*  5 |      INDEX RANGE SCAN          | ORD_CUSTOMER_IX |     5 |       |     1   (0)| 00:00:01 |
|*  6 |    INDEX UNIQUE SCAN           | EMP_EMP_ID_PK   |     1 |       |     0   (0)| 00:00:01 |
|   7 |   TABLE ACCESS BY INDEX ROWID  | EMPLOYEES       |     1 |    23 |     1   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   4 - filter("O"."SALES_REP_ID" IS NOT NULL)
   5 - access("O"."CUSTOMER_ID"=144)
   6 - access("E"."EMPLOYEE_ID"="O"."SALES_REP_ID")I haven't tested in 10g but I would expect similar results. If you can use either IN or EXISTS without affecting the logic, so can the optimizer.

Similar Messages

  • Index not being used in access path

    Hi,
    I have been trying to rewrite a query which currently is taking almost 1min and 25 secs to execute. The database version is 11.1.0.7.
    The query is -
    SELECT COUNT(1)
    FROM TAB1 p
    WHERE p.ACODE = 24377
    AND NOT EXISTS (SELECT 1 FROM TAB2 ph where ph.PKey = p.AKey )
    AND NOT EXISTS (SELECT 1 FROM TAB3 phs where phs.PKey = p.AKey )
    AND p.rflag = 'Y';
    The table originally didn't have an index on p.ACODE. So, I created this index and set it to visible and set the optimizer_use_invisible_indexes parameter also to TRUE. I set the monitoring on this index too. Even though I have created the index on the ACODE column, the access path doesn't use it. Can someone please tell me why this is not being used.
    Below is the explain plan for the sql stmt and the usage of the index -
    I have changed the actual table and column names -
    SQL> SELECT COUNT(1)
    2 FROM TAB1 p
    3 WHERE p.ACODE = 24377
    4 AND NOT EXISTS (SELECT 1 FROM TAB2 ph where ph.PKey = p.AKey )
    5 AND NOT EXISTS (SELECT 1 FROM TAB3 phs where phs.PKey = p.AKey )
    6 AND p.rflag = 'Y';
    COUNT(1)
    1
    SQL> explain plan for
    2 SELECT COUNT(1)
    3 FROM TAB1 p
    4 WHERE p.ACODE = 24377
    5 AND NOT EXISTS (SELECT 1 FROM TAB2 ph where ph.PKey = p.AKey )
    6 AND NOT EXISTS (SELECT 1 FROM TAB3 phs where phs.PKey = p.AKey )
    7 AND p.rflag = 'Y';
    Explained.
    Elapsed: 00:00:00.02
    SQL> @$ORACLE_HOME/rdbms/admin/utlxpls.sql
    PLAN_TABLE_OUTPUT
    Plan hash value: 3942424611
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 87 | 214K (2)| 00:42:57 |
    | 1 | SORT AGGREGATE | | 1 | 87 | | |
    |* 2 | HASH JOIN ANTI | | 1 | 87 | 214K (2)| 00:42:57 |
    |* 3 | HASH JOIN ANTI | | 1 | 60 | 209K (2)| 00:41:56 |
    |* 4 | TABLE ACCESS FULL | TAB1 | 1 | 32 | 209K (2)| 00:41:55 |
    | 5 | INDEX FAST FULL SCAN| PK_TAB3 | 29918 | 818K| 53 (0)| 00:00:01 |
    | 6 | INDEX FAST FULL SCAN | PK_TAB2 | 3199K| 82M| 5059 (1)| 00:01:01 |
    Predicate Information (identified by operation id):
    2 - access("PH"."PKey"="P"."AKey")
    3 - access("PHS"."PKey"="P"."AKey")
    4 - filter(TO_NUMBER("P"."ACODE")=24377 AND "P"."rflag"='Y')
    20 rows selected.
    Elapsed: 00:00:00.03
    SQL> select index_name,VISIBILITY from user_indexes where index_name='IDX_TAB1_ACODE';
    INDEX_NAME VISIBILIT
    IDX_TAB1_ACODE VISIBLE
    Elapsed: 00:00:00.01
    SQL> show parameter visible
    NAME TYPE VALUE
    optimizer_use_invisible_indexes boolean TRUE
    SQL>
    SQL> SELECT v.index_name, v.table_name,
    v.monitoring, v.used,
    start_monitoring, end_monitoring
    FROM v$object_usage v, dba_indexes u
    WHERE v.index_name = u.index_name
    AND v.index_name = 'IDX_TAB1_ACODE';
    INDEX_NAME TABLE_NAME MON USE START_MONITORING END_MONITORING
    IDX_TAB1_ACODE TAB1 YES NO 05/26/2010 14:13:41
    Elapsed: 00:00:00.10
    Edited by: user12158503 on May 26, 2010 1:24 PM

    Thanks Centinul.
    I apologize for posting in both sections. I put it in the Database General too because I thought I originally posted it in the wrong section.
    The index was not being used because it was doing the implicit type conversion. When I enclosed it in quotes, it returns the result within a second and it uses the index.(whereas without the index it takes around 1min 25 sec)
    Here is the explain plan and execution time after enclosing it in quotes -
    SQL> explain plan for
    2 SELECT COUNT(1)
    3 FROM TAB1 p
    4 WHERE p.AKey = '24377'
    5 AND NOT EXISTS (SELECT 1 FROM TAB2 ph where ph.PKey = p.AgilityKey )
    6 AND NOT EXISTS (SELECT 1 FROM TAB3 phs where phs.PKey = p.AgilityKey )
    7 AND p.rflag = 'Y';
    Explained.
    Elapsed: 00:00:00.02
    SQL> @$ORACLE_HOME/rdbms/admin/utlxpls.sql
    PLAN_TABLE_OUTPUT
    Plan hash value: 2008452282
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 87 | 5134 (1)| 00:01:02 |
    | 1 | SORT AGGREGATE | | 1 | 87 | | |
    |* 2 | HASH JOIN ANTI | | 1 | 87 | 5134 (1)| 00:01:02 |
    |* 3 | HASH JOIN ANTI | | 1 | 60 | 60 (2)| 00:00:01 |
    |* 4 | TABLE ACCESS BY INDEX ROWID| TAB1 | 1 | 32 | 6 (0)| 00:00:01 |
    |* 5 | INDEX RANGE SCAN | IDX_TAB1_AKey | 4 | | 1 (0)| 00:00:01 |
    | 6 | INDEX FAST FULL SCAN | PK_TAB3 | 29918 | 818K| 53 (0)| 00:00:01 |
    | 7 | INDEX FAST FULL SCAN | PK_TAB2 | 3199K| 82M| 5059 (1)| 00:01:01 |
    Predicate Information (identified by operation id):
    2 - access("PH"."PKey"="P"."AGILITYKEY")
    3 - access("PHS"."PKey"="P"."AGILITYKEY")
    4 - filter("P"."rflag"='Y')
    5 - access("P"."AKey"='24377')
    22 rows selected.
    Elapsed: 00:00:00.02
    SQL> SELECT COUNT(1)
    2 FROM TAB1 p
    3 WHERE p.AKey = '24377'
    4 AND NOT EXISTS (SELECT 1 FROM TAB2 ph where ph.PKey = p.AgilityKey )
    5 AND NOT EXISTS (SELECT 1 FROM TAB3 phs where phs.PKey = p.AgilityKey )
    6 AND p.rflag = 'Y';
    COUNT(1)
    1
    Elapsed: 00:00:00.52
    Can you give me some tips on where I could read about learning to understand the explain plan. I did read a few articles which did help me, but not much. I am looking for something in detail.

  • How improve performance on access path TABLE ACCESS BY INDEX ROWID ?

    I have table MOVEMENT with about 26millions entries,
    select rowid from movement xxx
    where
    xxx.sTransType > 0
    AND xxx.sDevice < 1000
    AND xxx.sDevice >= 0
    AND (bitand(xxx.sSaleFlag,1) = 0 AND bitand(xxx.sSaleFlag,4) = 0)
    AND xxx.sArtClassRef < 100
    and xxx.tActionTime BETWEEN TO_DATE('13-05-2011 08:08:34', 'dd-mm-yyyy hh24:mi:ss') AND to_date('13-05-2011 14:08:34', 'dd-mm-yyyy hh24:mi:ss') ;
    PLAN_TABLE_OUTPUT
    Plan hash value: 679628763
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 34 | 10102 (1)| 00:02:02 |
    |* 1 | TABLE ACCESS BY INDEX ROWID| MOVEMENT | 1 | 34 | 10102 (1)| 00:02:02 |
    |* 2 | INDEX RANGE SCAN | MOVATIME_IX | 18489 | | 51 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - filter("XXX"."SARTCLASSREF"<100 AND BITAND("XXX"."SSALEFLAG",1)=0 AND
    BITAND("XXX"."SSALEFLAG",4)=0 AND "XXX"."STRANSTYPE">0 AND "XXX"."SDEVICE"<1000
    AND "XXX"."SDEVICE">=0)
    2 - access("XXX"."TACTIONTIME">=TO_DATE('2011-05-13 08:08:34', 'yyyy-mm-dd
    hh24:mi:ss') AND "XXX"."TACTIONTIME"<=TO_DATE('2011-05-13 14:08:34', 'yyyy-mm-dd
    hh24:mi:ss'))
    there is index on tActionTime - MOVATIME_IX
    This query returns 12203 rows, so I would anticipate this number in plan table in row with id 1 and column Rows
    Final question if it is possible to optimize this query and what are the next steps to do it?
    Thanks.

    >
    I thought that access path via ROWID's is the fastest way to get row
    >
    It is the fastest way to get the row - FROM THE TABLE.
    But the ROWIDs have to be gotten from the index. That is what the INDEX RANGE SCAN is doing. It is getting the ROWIDs needed and then the TABLE ACCESS BY INDEX ROWID is getting the rows.
    >
    I'am still confused with COST values, TABLE ACCESS BY INDEX ROWID has 200times higher cost than INDEX RANGE SCAN,
    >
    The index entries for a range scan are in order so they are very compact. The actual rows might be all over the place.
    Have you ever you a library? Not the online ones - I mean the old-fashioned kind that actually has books printed on paper?
    If the librarian asks you, her helper, to go get all books whose title begins with the letter 'B' how would you do it?
    You could go back to the stacks and look at every book on every shelf for books with titles' starting with 'B'. That is the same as a FULL TABLE SCAN.
    Or you could go to the card catalog, pull out the drawer (or drawers) that has 'B' on the label and look at the information on the card. Part of that information is the location of the actual book: section, stack; that is similar to the ROWID.
    The card catalog might get you to the right stack of books; then you have to search the stack sequentially to look for the book by name.
    A ROWID will get Oracle to the right block but then it has to find the right row.
    So the cost of getting ROWIDs from an index using a RANGE SCAN (where values are scanned in order) is a lot cheaper than actually getting the rows. The first two index entries needed might be right next to each other in order but the rows themselves might be far apart on the disk.

  • EssbaseCluster-1 in 11.1.2 - giving users filter access

    I am attempting to grant users filter access to an Essbase application in 11.1.2.1
    In Shared services I am right-mouse-clicking on the application under the EssbaseCluster-1 node, and selecting "Assign Access Control", but no users are displayed when I click the "Search" button. I have previously provisioned some users with filter access in HSS, but no success.
    Any suggestions folks ?
    Edited by: Xansaman on Aug 1, 2011 8:41 PM

    OK its as simple as the user having a higher level of access to the cube via membership of a group !
    Adding a user with just server access & filter access to the cube enables "Assign Access Control" to operate properly !

  • Changing Content.Access.Path into short URL implies errors at CAT2

    Hello,
    After changing the Content.Access.Path to another value due to the note 549610 I see complications and errors on my application cat2, that some buttons and information aren´t showed any more.
    When I do the changes in the Content.Access.Path backwards, the errors in cat2 aren´t there any more.
    I think that solving one problem (changing parameters) has effect to onother application.
    Who can help me, please?
    Thank you in advance!!
    Best regards
    Andreas

    Hi priya,
    Not sure: check syntax in your Update Roules, also at level of start routine.
    Ciao.
    Riccardo.

  • PARTITION RANGE SUBQUERY - Access path

    Below quote is from Oracle product documentation.
    <quote>
    If the table with the WHERE predicate is relatively small compared to the partitioned table, and the expected reduction of records or partitions for the partitioned table is significant, Oracle will perform dynamic partition pruning using a recursive subquery
    </quote>
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14223/parpart.htm#sthref215
    create table t(
         x number,
         y number,
         z number
    ) partition by range(z)
         partition p_10 values less than ( 11),
         partition p_20 values less than ( 21),
         partition p_30 values less than ( 31),
         partition p_40 values less than ( 41),
         partition p_50 values less than ( 51),
         partition p_60 values less than ( 61),
         partition p_70 values less than ( 71),
         partition p_80 values less than ( 81),
         partition p_90 values less than ( 91),
         partition p_100 values less than ( 101)
    create table t1
    as
    select mod(rownum,10) as id,
         username ,
         sysdate as dt
    from all_users;     
    insert /*+ append */ into t
    select level,level,10
    from dual
    connect by level <= 1000000;
    commit;
    insert /*+ append */ into t select x,y,20 from t partition (p_10);
    commit;
    insert /*+ append */ into t select x,y,30 from t partition (p_10);
    commit;
    insert /*+ append */ into t select x,y,40 from t partition (p_10);
    commit;
    insert /*+ append */ into t select x,y,50 from t partition (p_10);
    commit;
    insert /*+ append */ into t select x,y,60 from t partition (p_10);
    commit;
    insert /*+ append */ into t select x,y,70 from t partition (p_10);
    commit;
    insert /*+ append */ into t select x,y,80 from t partition (p_10);
    commit;
    insert /*+ append */ into t select x,y,90 from t partition (p_10);
    commit;
    insert /*+ append */ into t select x,y,100 from t partition (p_10);
    commit;
    begin
         dbms_stats.gather_table_Stats(user,'T1');
         dbms_stats.gather_table_stats(ownname=>user,tabname=>'T',degree=>16);
    end;
    select /*+ use_hash(t,t1) */ t.*
    from t, t1
    where t.z = t1.id
    and t1.username ='SCOTT'
    call count cpu elapsed disk query current rows
    Parse 1 0.03 0.67 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 0.65 0.65 0 2507 0 0
    total 3 0.68 1.32 0 2507 0 0
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 100
    Rows Row Source Operation
    0 HASH JOIN (cr=2510 pr=0 pw=0 time=653031 us)
    1 TABLE ACCESS FULL T1 (cr=3 pr=0 pw=0 time=59 us)
    1000000 PARTITION RANGE SUBQUERY PARTITION: KEY(SUBQUERY) KEY(SUBQUERY) (cr=2507 pr=0 pw=0 t
    1000000 TABLE ACCESS FULL T PARTITION: KEY(SUBQUERY) KEY(SUBQUERY) (cr=2504 pr=0 pw=0 t
    select /*+ use_nl(t,t1) */ t.*
    from t, t1
    where t.z = t1.id
    and t1.username ='SCOTT'
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 0.12 0.12 0 2506 0 0
    total 3 0.12 0.12 0 2506 0 0
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 100
    Rows Row Source Operation
    0 NESTED LOOPS (cr=2506 pr=0 pw=0 time=123836 us)
    1 TABLE ACCESS FULL T1 (cr=3 pr=0 pw=0 time=53 us)
    0 PARTITION RANGE ITERATOR PARTITION: KEY KEY (cr=2503 pr=0 pw=0 time=123777 us)
    0 TABLE ACCESS FULL T PARTITION: KEY KEY (cr=2503 pr=0 pw=0 time=123761 us)
    Questions_
    1) what is the significant in having this PARTITION RANGE SUBQUERY access path in Oracle 10g? Even reading documentation, still unclear.
    Edited by: Rajeshwaran on Nov 15, 2010 8:05 AM

    Yep..Here is the code.
    create table t(
         x number,
         y number,
         z number
    ) partition by range(z)
         partition p_10 values less than ( 11),
         partition p_20 values less than ( 21),
         partition p_30 values less than ( 31),
         partition p_40 values less than ( 41),
         partition p_50 values less than ( 51),
         partition p_60 values less than ( 61),
         partition p_70 values less than ( 71),
         partition p_80 values less than ( 81),
         partition p_90 values less than ( 91),
         partition p_100 values less than ( 101)
    create table t1
    as
    select mod(rownum,10) as id,
            username ,
            sysdate as dt
    from all_users;       
    insert /*+ append */ into t
    select level,level,10
    from dual
    connect by level <= 1000000;
    commit;
    insert /*+ append */ into t select x,y,20 from t partition (p_10);
    commit;
    insert /*+ append */ into t select x,y,30 from t partition (p_10);
    commit;
    insert /*+ append */ into t select x,y,40 from t partition (p_10);
    commit;
    insert /*+ append */ into t select x,y,50 from t partition (p_10);
    commit;
    insert /*+ append */ into t select x,y,60 from t partition (p_10);
    commit;
    insert /*+ append */ into t select x,y,70 from t partition (p_10);
    commit;
    insert /*+ append */ into t select x,y,80 from t partition (p_10);
    commit;
    insert /*+ append */ into t select x,y,90 from t partition (p_10);
    commit;
    insert /*+ append */ into t select x,y,100 from t partition (p_10);
    commit;
    begin
         dbms_stats.gather_table_Stats(user,'T1');
         dbms_stats.gather_table_stats(ownname=>user,tabname=>'T',degree=>16);
    end;
    select /*+ use_hash(t,t1) */ t.*
    from t, t1
    where t.z = t1.id
    and   t1.username ='SCOTT'
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.03       0.67          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.65       0.65          0       2507          0           0
    total        3      0.68       1.32          0       2507          0           0
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 100 
    Rows     Row Source Operation
          0  HASH JOIN  (cr=2510 pr=0 pw=0 time=653031 us)
          1   TABLE ACCESS FULL T1 (cr=3 pr=0 pw=0 time=59 us)
    1000000   PARTITION RANGE SUBQUERY PARTITION: KEY(SUBQUERY) KEY(SUBQUERY) (cr=2507 pr=0 pw=0 t
    1000000    TABLE ACCESS FULL T PARTITION: KEY(SUBQUERY) KEY(SUBQUERY) (cr=2504 pr=0 pw=0 t
    select /*+ use_nl(t,t1) */ t.*
    from t, t1
    where t.z = t1.id
    and   t1.username ='SCOTT'
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.12       0.12          0       2506          0           0
    total        3      0.12       0.12          0       2506          0           0
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 100 
    Rows     Row Source Operation
          0  NESTED LOOPS  (cr=2506 pr=0 pw=0 time=123836 us)
          1   TABLE ACCESS FULL T1 (cr=3 pr=0 pw=0 time=53 us)
          0   PARTITION RANGE ITERATOR PARTITION: KEY KEY (cr=2503 pr=0 pw=0 time=123777 us)
          0    TABLE ACCESS FULL T PARTITION: KEY KEY (cr=2503 pr=0 pw=0 time=123761 us)

  • Why the query access path is different !

    Hi All
    I have a query which is running satisfactorily in TEST but is taking a long time in PROD.
    SELECT * FROM MTHLY_PROD_BASE WHERE START_DATE >= to_date('1/1/2013','mm/dd/yyyy') AND START_DATE < to_date('1/1/2014','mm/dd/yyyy')
    MTHLY_PROD_BASE is a view, containing some underlying tables and views which are doing summations and groupings of data.
    I have access plans for it in TEST and PROD in jpg format, but I am not able to attach here as the "Insert Image" button is inactive for me. How can I attach them for explaining my issue properly ?
    There was some memory added around a week ago to the DB server for improving performance of another database, but since then the DB in which I ran the query is performing poorly.
    Data for underlying tables, being referenced in the query, in TEST is same as in PROD, but the plans are different.
    I need to know what factors may cause the access path for a query to change, so that I can investigate what else might have got changed/impacted in PROD ?
    Thanks

    AnkitV wrote:
    Hi all
    1) version info of TEST and PROD:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    "CORE    11.2.0.2.0    Production"
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    2) Platform is Aix 6.1.0.0
    3) Query as mentioned in initial post too :SELECT * FROM MTHLY_PROD_BASE WHERE START_DATE >= to_date('1/1/2013','mm/dd/yyyy') AND START_DATE < to_date('1/1/2014','mm/dd/yyyy')
    4) As I mentioned, I do not have plan in text format, and its lots of lines in the
    I need to know what might be the reason for change in the access mode for the query in PROD, which has caused it to take 3-4 hrs instead of 30 mins ?
    Any help will be highly appreciated.
    different results occur when something is different between the two environments.
    Since we don't have access to either system, YOU are the only one who can actually compare & contrast between the two systems.
    HOW To Make TUNING request
    https://forums.oracle.com/forums/thread.jspa?threadID=2174552#9360003

  • Access Path !

    I am running a SQL query statement in two environments.
    In the first environment the access paths are differents, one running SQL statement with index and other running SQL statement without index. This is normal behaviour which i expected.
    But on the second environment, the access path remains the same when i run the query with index or run the query without index, the access path does not change even on giving the HINT in the query!
    Any help is appreciated!
    Thanks
    Gururaj

    Please refer to documenation :
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/optimops.htm#i21299

  • How to change access path for 'where' clause by using HINTS?

    I searched a loooot of posts and haven't found a solution for my case. I don't even know whether it is possible or not. Is it possible to change the sequence of Oracle "Predicate Information"?
    Here is my SQL and Oracle's execution plan.
      SELECT Max(logId) AS logId FROM online_users_t
      WHERE online_users_date >= to_date('2011-09-19 10:00:00') - 3.2 AND online_users_date <= to_date('2011-09-19 10:00:00') AND online_users_result in (1, -1)
      GROUP BY online_users_user
    | Id  | Operation                    | Name               | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                    | 24800 |   629K|  1336   (1)| 00:00:17 |
    |   1 |  HASH GROUP BY               |                    | 24800 |   629K|  1336   (1)| 00:00:17 |
    |*  2 |   TABLE ACCESS BY INDEX ROWID| ONLINE_USERS_T     | 38833 |   985K|  1334   (1)| 00:00:17 |
    |*  3 |    INDEX RANGE SCAN          | ONLINE_USERS_T_IDX |   116K|       |   313   (1)| 00:00:04 |
    Predicate Information (identified by operation id):
       2 - filter("ONLINE_USERS_RESULT"=(-1) OR "ONLINE_USERS_RESULT"=1)
       3 - access("ONLINE_USERS_DATE">=TO_DATE(' 2011-09-16 05:12:00', 'syyyy-mm-dd
                  hh24:mi:ss') AND "ONLINE_USERS_DATE"<=TO_DATE(' 2011-09-19 10:00:00', 'syyyy-mm-dd
                  hh24:mi:ss'))I have 2 conditions in my 'where' clause, one is date range and the other is 'online_users_result in (1, -1)'. It seems that Oracle filter the table by using 'online_users_result in (1, -1)' first, then access it through date range.
    What I want to do is firstly filtering the table by using date range followed by other things. How can I do it?
    Any clue or help would be highly appreciated.
    Thanks in advance.

    It seems that Oracle filter the table by using 'online_users_result in (1, -1)' first, then access it through date range. No it's not.
    What I want to do is firstly filtering the table by using date range followed by other things. How can I do it?That's precisely what it's doing now.
    It is using the T_IDX index to quickly find all rows that satisfy the range predicate on the date column.
    And then filter those rows to only retrieve the ones that satisfy the other predicate (... in (1,-1)).

  • Essbase 11.1.2.1 Users not inheriting filter access from group

    Hello all! We installed Essbase 11.1.2.1 in a distributed environment integrated with Shared Services and ran into an issue when provisioning users via groups. Using Shared Services we created a Native Directory Group and User. We provisioned the group with the Server Access Role and Filter Application role, then assigned the filter to the group using 'assign access control' on the application in Shared Services. For some reason using the Essbase add-in we are unable to retrieve data from the database. We receive an error stating the user id does not have read access to the db. If we carry out the same provisioning steps above on the user directly, we are able to retrieve data from the database. Any ideas on what might be causing this?

    In V11.1.2.2 ESSBASE is managed by OPMN. OPMN needs to be started before starting ESSBASE. You need to use "start.sh". Please do the following
    1) Run "stop.sh" that is in the starter scripts folder - This will stop all Oracle EPM components that are installed on the box
    2) Run "start.sh" - this will start OPMN, ESSBASE and all other installed components
    The "startEssbase.sh" and "stopEssbase.sh" can be used to start or stop ESSBASE only when OPMN is already running.

  • Filter access

    Does anyone have an example filter to limit access for administrators to only be able to manage users that are already in a specified group ?
    Example : I want administrators that are members of "Region1_admin" to only see members of group "Region1_user"
    My DIT looks something like this :
    Groups
    - Region1_user
    - Region2_user
    - Region1_admin
    - Region2_admin
    Users
    - user1
    - user2
    - user3
    - user4
    - user5
    - user6

    You need to define Access Controls - ACIs . Have you done so . Something similar to following:
    dn: Region1_user,dc=xyz,dc=com
    orclaci: access to entry by group="Region1_admin,dc=xyz,dc=com" BindMode="Simple" (noadd,nodelete,browse) by * BindMode="Simple"(nobrowse,noadd,nodelete)
    use ldapmodify command line or you can also use ODM to do the same.
    Syed

  • Access Paths in .eps

    Hi, a few days ago I was able to access the paths of an .eps file opened in Illustrator. Now that I need to use it again I can't find back how I did this. It was not group, ungroup is grayed out ...
    Hint very appreciated.
    Thx,
    Frank

    Yea ! That worked. I actually just figured that when I go file/open and read an .eps file, it also reveals the paths. That's wh I was able to access them the last time. This time I just had dragged them into an artboard, which then is this other reading mode that needs embedding ... in case stuff was linked I guess.
    Thx Monika,
    Frank

  • Essbase security filter access issue

    Hi,
    we are facing access issue for users. we have provided the access as filter, its essbase only application. we dont see in display user table APP Access Type column essbase&Planning, only planning its showing..its 9.3.1 version. even sync native dir & essbase refresh done couple of times..but still issue persists.
    please help.
    :-):-)

    Hi John,
    I have done same thing, but its just showing filters only.
    In Projects->select server/app->selected user/grp->
    right click the essbase icon and select "assign access control" > select your user/grp, here i can see only filters which already there and calc (none,no update, all& calcs).
    I have selected one filter and none(calc option)->click on tick mark->save......but here i am getting message as "no changes to save" then done EAS refresh ....
    still users are not able to login.getting error
    "user <> not permitted to access application"
    Note: other users have same access can able to login & we are able to see those users in users table as "essbase&Planning", but for problem users its still showing that only 'planning'
    please help
    thanks

  • Access path difference between Primary Key and Unique Index

    Hi All,
    Is there any specific way the oracle optimizer treats Primary key and Unique index differently?
    Oracle Version
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL> Sample test data for Normal Index
    SQL> create table t_test_tab(col1 number, col2 number, col3 varchar2(12));
    Table created.
    SQL> create sequence seq_t_test_tab start with 1 increment by 1 ;
    Sequence created.
    SQL>  insert into t_test_tab select seq_t_test_tab.nextval, round(dbms_random.value(1,999)) , 'B'||round(dbms_random.value(1,50))||'A' from dual connect by level < 100000;
    99999 rows created.
    SQL> commit;
    Commit complete.
    SQL> exec dbms_stats.gather_table_stats(USER_OWNER','T_TEST_TAB',cascade => true);
    PL/SQL procedure successfully completed.
    SQL> select col1 from t_test_tab;
    99999 rows selected.
    Execution Plan
    Plan hash value: 1565504962
    | Id  | Operation         | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |            | 99999 |   488K|    74   (3)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| T_TEST_TAB | 99999 |   488K|    74   (3)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
           6915  consistent gets
            259  physical reads
              0  redo size
        1829388  bytes sent via SQL*Net to client
          73850  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    SQL> create index idx_t_test_tab on t_test_tab(col1);
    Index created.
    SQL> exec dbms_stats.gather_table_stats('USER_OWNER','T_TEST_TAB',cascade => true);
    PL/SQL procedure successfully completed.
    SQL> select col1 from t_test_tab;
    99999 rows selected.
    Execution Plan
    Plan hash value: 1565504962
    | Id  | Operation         | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |            | 99999 |   488K|    74   (3)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| T_TEST_TAB | 99999 |   488K|    74   (3)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
           6915  consistent gets
              0  physical reads
              0  redo size
        1829388  bytes sent via SQL*Net to client
          73850  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    SQL> Sample test data when using Primary Key
    SQL> create table t_test_tab1(col1 number, col2 number, col3 varchar2(12));
    Table created.
    SQL> create sequence seq_t_test_tab1 start with 1 increment by 1 ;
    Sequence created.
    SQL> insert into t_test_tab1 select seq_t_test_tab1.nextval, round(dbms_random.value(1,999)) , 'B'||round(dbms_random.value(1,50))||'A' from dual connect by level < 100000;
    99999 rows created.
    SQL> commit;
    Commit complete.
    SQL> exec dbms_stats.gather_table_stats('USER_OWNER','T_TEST_TAB1',cascade => true);
    PL/SQL procedure successfully completed.
    SQL> select col1 from t_test_tab1;
    99999 rows selected.
    Execution Plan
    Plan hash value: 1727568366
    | Id  | Operation         | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |             | 99999 |   488K|    74   (3)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| T_TEST_TAB1 | 99999 |   488K|    74   (3)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
           6915  consistent gets
              0  physical reads
              0  redo size
        1829388  bytes sent via SQL*Net to client
          73850  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    SQL> alter table t_test_tab1 add constraint pk_t_test_tab1 primary key (col1);
    Table altered.
    SQL> exec dbms_stats.gather_table_stats('USER_OWNER','T_TEST_TAB1',cascade => true);
    PL/SQL procedure successfully completed.
    SQL> select col1 from t_test_tab1;
    99999 rows selected.
    Execution Plan
    Plan hash value: 2995826579
    | Id  | Operation            | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |                | 99999 |   488K|    59   (2)| 00:00:01 |
    |   1 |  INDEX FAST FULL SCAN| PK_T_TEST_TAB1 | 99999 |   488K|    59   (2)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
           6867  consistent gets
              0  physical reads
              0  redo size
        1829388  bytes sent via SQL*Net to client
          73850  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    SQL> If you see here the even though statistics were gathered,
         * In the 1st table T_TEST_TAB, the table is still using FULL table access after creation of index.
         * And in the 2nd table T_TEST_TAB1, table is using PRIMARY KEY as expected.
    Any comments ??
    Regards,
    BPat

    Thanks.
    Yes, ignored the NOT NULL part.Did a test and now it is working as expected
    SQL>  create table t_test_tab(col1 number not null, col2 number, col3 varchar2(12));
    Table created.
    SQL>
    create sequence seq_t_test_tab start with 1 increment by 1 ;SQL>
    Sequence created.
    SQL> insert into t_test_tab select seq_t_test_tab.nextval, round(dbms_random.value(1,999)) , 'B'||round(dbms_random.value(1,50))||'A' from dual connect by level < 100000;
    99999 rows created.
    SQL> commit;
    Commit complete.
    SQL>  exec dbms_stats.gather_table_stats('GREP_OWNER','T_TEST_TAB',cascade => true);
    PL/SQL procedure successfully completed.
    SQL>  set autotrace traceonly
    SQL>  select col1 from t_test_tab;
    99999 rows selected.
    Execution Plan
    Plan hash value: 1565504962
    | Id  | Operation         | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |            | 99999 |   488K|    74   (3)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| T_TEST_TAB | 99999 |   488K|    74   (3)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
           6912  consistent gets
              0  physical reads
              0  redo size
        1829388  bytes sent via SQL*Net to client
          73850  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    SQL>  create index idx_t_test_tab on t_test_tab(col1);
    Index created.
    SQL>  exec dbms_stats.gather_table_stats('GREP_OWNER','T_TEST_TAB',cascade => true);
    PL/SQL procedure successfully completed.
    SQL>  select col1 from t_test_tab;
    99999 rows selected.
    Execution Plan
    Plan hash value: 4115006285
    | Id  | Operation            | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |                | 99999 |   488K|    63   (2)| 00:00:01 |
    |   1 |  INDEX FAST FULL SCAN| IDX_T_TEST_TAB | 99999 |   488K|    63   (2)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
           6881  consistent gets
              0  physical reads
              0  redo size
        1829388  bytes sent via SQL*Net to client
          73850  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    SQL>

  • Filter access points by MAC address

    I've got a constant problem with ad-hoc networks (set up accidentally by various users around me--I am a faculty in residence living on a college campus) with the same SSID as the (unsecured) network that I am trying to connect to with my PB G4 running 10.4.3. When the signal strength from the ad-hoc is stronger than from the real access point, only the ad-hoc shows up in my Airport drop down menu (i.e., all the entries are listed as "Computer to computer"). I can connect to the access point via iStumbler, but it's a nuisance to do that every time and anyway my PB keeps on dropping that connection in favor of the stronger signal of the ad-hoc.
    I'd like to be able to do one or more of the following:
    (1) Prohibit my PB from connecting to ad-hoc networks even if they happen to have the same SSID as my preferred network. (And, no, none of the options in the Network control panel seem to help.) I would have no problem with completely forbidding my PB from connecting to ad-hoc networks as I have no need for such connections for my PB.
    (2) Employ a whitelist of MAC addresses that I want to allow my PB to connect to. (A blacklist is not as useful, since the MAC address of the ad-hoc keeps on changing. But I suppose I could run some script in the background that logs the ad-hocs current MAC address and feeds it into the blacklist.)
    (3) Find out the machine name (which is typically a student's name) or other identifying info of the machine that is originating the ad-hoc network, so I can talk to the person who is originating the network (it violates campus policy, and is a nuisance to a lot of people). I tried locating the network source with a directional antenna, but failed. (We've got a high density here, and I thought I talked to all the folks around where the signal seemed strongest.)
    Thanks for any suggestions!
    Alex Pruss

    Chances are, there is no bug.
    You likely have the Default Rule in Timed Access set to Unlimited. So, any device that provides the password will be allowed to connect at all times.
    If you do not want a device to be able to connect by simply entering the password, you must first change the Default Rule to No Access. Then, a device will only be allowed to connect if your have an entry using the MAC address of the device and the time period specified that it will be allowed to connect.

Maybe you are looking for

  • Can't open Office documents from network share

    Dear, I have a user named X that can't open Office documents from two specific shares. We call this shares T and U. When the user X opens Office documents the error message is "...xlsx can't be opened". The problem is not client specific because when

  • How to set up guest password?

    I still cannot figure out how to set up a guest password on my wireless network.  I'm trying to use 192.168.1.1 but dont see an obvious place to set the information.  And do I have to connect to router to the laptop before making the changes?

  • Song In Latest "Breakaway" Commercial???

    I know this question has little (to absolutely nothing) to do with anything tech support-related, but a lot of people (including me of course), are curious to know the name of that unique song playing in the latest "Breakaway" commercial for the Fall

  • Editing PDF presets in Illustrator CS6

    Question: I want to edit the PDF presets I have already set up in Illustrator CS6. They were set up for a specific print job that I no longer need. For the life of me I cannot find an edit button OR a reset to default list button. Either I am blind o

  • Passing table to another component.

    Hi, I am a newbie in ABAP Web Dynpro.  I have a requirment wherein I need to pass values from 1 table into other table in different components. Brief: In my component A I have a table with columns A, B, C, D and an 'Add' button which on clicking open