Is it possible to avoid the access "BY INDEX ROWID'?

Hello

I run a query for the primary key of a table with a text index on a column of text, something like

Pkey SELECT FROM table WHERE CONTAINS (text, 'foobar') > 0.

As expected, the index is scanned for the corresponding ROWID and then the rows are retrieved (BY INDEX ROWID).

I wonder if its possible to include the primary key in the text index column, so that the table must not be access at all when querying for the primary key (this is possible with regular index).

I tried
1. creating a Composite field Index (i.e. including the primary key column in the FILTER clause BY index)
2. create a SURLABASEDESDONNEESDUFABRICANTDUBALLAST section on pkey
3. creating a MONTANA section on pkey

In all cases, the lines were always accessible by ROWID.

Any ideas?

If you 11.2, you can try using the Interface of the result value. This query system (based on XML) will allow you to retrieve values SURLABASEDESDONNEESDUFABRICANTDUBALLAST directly from the text index without accessing the base table.

In previous versions, unfortunately I don't think that there is a way to do it without going through the base table.

Tags: Database

Similar Questions

  • TABLE ACCESS BY INDEX ROWID

    Hi all

    I want to know
    TABLE ACCESS BY INDEX ROWID
    that comes when we set AUTOTRACE ON;

    In fact
    Select * from t1 where manager_id = 30 and employee_id = 130 and department_id = 140

    Here I have range index on manager_id and department_id

    and a unique index on employe_id

    the plan is

    no rows selected
    
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 2444942575
    
    --------------------------------------------------------------------------------
    
    ----
    
    | Id  | Operation                   | Name | Rows  | Bytes | Cost (%CPU)| Time
       |
    
    --------------------------------------------------------------------------------
    
    ----
    
    |   0 | SELECT STATEMENT            |      |     1 |   133 |     1   (0)| 00:00:
    
    01 |
    
    |*  1 |  TABLE ACCESS BY INDEX ROWID| T1   |     1 |   133 |     1   (0)| 00:00:
    
    01 |
    
    |*  2 |   INDEX UNIQUE SCAN         | T3   |     1 |       |     0   (0)| 00:00:
    
    01 |
    
    --------------------------------------------------------------------------------
    
    ----
    
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       1 - filter("MANAGER_ID"=30 AND "DEPARTMENT_ID"=140)
       2 - access("EMPLOYEE_ID"=130)
    
    
    Statistics
    ----------------------------------------------------------
              0  recursive calls
              0  db block gets
              2  consistent gets
              0  physical reads
              0  redo size
            881  bytes sent via SQL*Net to client
            405  bytes received via SQL*Net from client
              1  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              0  rows processed
    I thought that this single number would be used because it is unique indexed and I used for her =. I don't know wether I'm right or not can you please explain and that ACCESS BY ROWID TABLE INDEX means in explaining the plan?

    If you have an idea you can share it please?


    Thank you

    Published by: 810345 on May 10, 2011 21:22

    You have a unique index on employe_id and a predicate of equality against employee_id, so that the optimizer has chosen to use the unique index to get the identifier for the line with employee_id = 130. This is the entrance of access ("EMPLOYEE_ID" = 130) against the unique systematic index scan in the plan.

    Using this rowid, it accessible table a) check if manager_id = 30 and department_id = 140 (this is the filter ("MANAGER_ID" = 30 AND "Department_id" = 140) entered against access by index rowid plan the table) and b) retrieve the other columns from the employee table to meet select * part of your query.

    All indexes store the ID of the row indexed as part of the index. This is the reason for which an index can speed up access to the table, because usually the index is smaller than the table and is stored sorted by the value of the indexed column.

    John

  • Table slow access by index rowid

    Hi all
    10.2.0.1
    I have two queries that do the same thing but written in a different way.
    A quick index is scan and accesses the table with rowid, the other performs a full table scan.

    Partial TKPROF for query performing index scan Q_I:
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        1      0.01       0.01          0          0          2           0
    Execute      1      0.00       0.00          0          0         13           0
    Fetch        5      0.14       0.69         13      24252          0          53
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total        7      0.15       0.70         13      24252         15          53
    
    Misses in library cache during parse: 1
    
    Rows     Row Source Operation
    -------  ---------------------------------------------------
         53  SORT GROUP BY (cr=24252 pr=13 pw=0 time=692418 us)
       1103   HASH JOIN  (cr=24252 pr=13 pw=0 time=691345 us)
        222    TABLE ACCESS FULL HOD_USER (cr=5 pr=0 pw=0 time=42 us)
       1100    VIEW  (cr=24247 pr=13 pw=0 time=690198 us)
      1100     HASH GROUP BY (cr=24247 pr=13 pw=0 time=689097 us)
      36496      TABLE ACCESS BY INDEX ROWID DDO_ALT (cr=24247 pr=13 pw=0 time=109536 us)
      36496       INDEX FULL SCAN PK_DDOALT (cr=2226 pr=6 pw=0 time=36532 us)(object id 117105)
    
    
    Rows     Execution Plan
    -------  ---------------------------------------------------
          0  SELECT STATEMENT   MODE: ALL_ROWS
         53   SORT (GROUP BY)
       1103    HASH JOIN
        222     TABLE ACCESS   MODE: ANALYZED (FULL) OF 'HOD_USER' (TABLE)
       1100     VIEW
       1100      HASH (GROUP BY)
      36496       TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID) OF
                      'DDO_ALT' (TABLE)
      36496        INDEX   MODE: ANALYZED (FULL SCAN) OF 'PK_DDOALT'
                       (INDEX (UNIQUE))
    
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       5        0.00          0.00
      db file sequential read                        13        0.09          0.55
      SQL*Net message from client                     5        0.00          0.00
    Query run TKProf full table SCAN Q_f:
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        1      0.00       0.00          0          0          4           0
    Execute      1      0.00       0.00          0          0         13           0
    Fetch        5      0.15       0.39         17       2023          0          53
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total        7      0.15       0.40         17       2023         17          53
    
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    
    
    Rows     Row Source Operation
    -------  ---------------------------------------------------
         53  SORT GROUP BY NOSORT (cr=2023 pr=17 pw=0 time=398252 us)
        648   VIEW  (cr=2023 pr=17 pw=0 time=399497 us)
        648    SORT GROUP BY (cr=2023 pr=17 pw=0 time=398845 us)
      37537     HASH JOIN  (cr=2023 pr=17 pw=0 time=564274 us)
        222      TABLE ACCESS FULL HOD_USER (cr=5 pr=0 pw=0 time=267 us)
      36679      TABLE ACCESS FULL DDO_ALT (cr=2018 pr=17 pw=0 time=37 us)
    
    
    Rows     Execution Plan
    -------  ---------------------------------------------------
          0  SELECT STATEMENT   MODE: ALL_ROWS
         53   SORT (GROUP BY NOSORT)
        648    VIEW
     648     SORT (GROUP BY)
      37537      HASH JOIN
        222       TABLE ACCESS   MODE: ANALYZED (FULL) OF 'HOD_USER'
                      (TABLE)
      36679       TABLE ACCESS   MODE: ANALYZED (FULL) OF 'DDO_ALT' (TABLE)
    
    
    
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       5        0.00          0.00
      db file sequential read                        15        0.06          0.18
      db file scattered read                          1        0.06          0.06
      SQL*Net message from client                     5        0.00          0.00
    Why 24247 complies for access by index rowid table, for access to the index, is 2226.
    Why the full table scan is faster in this case?

    Hisoka says:
    Why the full table scan is faster in this case?

    As P. Forstmann suggested, it would help if you can post queries and their results of EXPLAIN PLAN.
    Now, I know guess is bad, but I want to have a go on this one, so we'll see ;)
    My comments (in no particular order of relevance/importance)
    (1) you use a non patched (10.2.0.1) version which, I believe, is known to contain many bugs (and therefore can throw 'surprises')
    (2) the name of the index, it is clear that PK_DDOALT is a unique index (supporting the primary key constraint) table DDO_ALT so
    factor clustered index is (probably) not the issue.
    (3) the TkProf output tells 36496 lines are currently extracted from table DDO_ALT in the query that uses the index analysis while
    36679 lines are currently extracted a DDO_ALT table in the query that uses the full table scan.
    It seems that the DDO_ALT table has about 36679 lines. Now, it will be slower (such as oracle to access most of these lines using the index
    you will need to visit a (table) block at the same time (and will eventually visit same block several times) compared to the full table scan.
    who reads several blocks at a time (and eventually NOT have to visit same block several times). This can be confirmed
    by the numbers "cr" TkProf. 24247 consistent gets for the query using access indexed for 36496 lines (with the exception of consistent gets for the reading of the index)
    2018 coherent vs gets to access 36679 lines.
    (4) the operation "line Source" indicates that the query using an indexed access is written so that it forces the use of the index (most likely
    using an indicator of index). It's that reason optimizer uses "INDEX FULL SCAN" and not "INDEX RANGE SCAN". A FULL INDEX SCAN bed set
    structure of the index, a block at a time, which is not an efficient operation compared to the optimizer to choose naturally "INDEX RANGE SCAN", which
    that will show some of the index blocks.
    (5) Finally, it appears this query that uses access indexed, is written to 'say' oracle how to process the query. Maybe it's OK if you think that
    your knowledge of the data schemas is better than knowledge of the optimizer. But this certainly isn't the case here.
    Your queries are probably something like
    Query using index:

    SELECT 
    FROM HOD_USER, (SELECT /*+ INDEX(DDO_ALT PK_DDOALT) */ 
                                 FROM DDO_ALT
                                GROUP BY ) DD
    WHERE HOD_USER. = DD.
    GROUP BY 
    ORDER BY 
    

    The query using full table scan:

    SELECT 
     FROM (SELECT 
                 FROM HOD_USER, DDO_ALT
              WHERE HOD_USER. = DDO_ALT.
                 GROUP BY 
                 ORDER BY )
    GROUP BY 
    ORDER BY 
    

    Published by: user503699 on August 21, 2010 18:47 added ORDER BY clauses for both queries

  • Is it possible to prohibit the access of some users in the Panel?

    My PC running Windows 7 is used by some users.

    I want to edit group policy to deny access to users 2 Control Panel, but I don't want to change the strategy of control panel for other users.

    Is it possible to change the policy to only 2 users in admin account or do I need to log on as each account to change the policy for each user?

    Please give me some advice.

    Hello

    Your system is connected to a domain?

    The question you posted would be better suited for COMPUTING public Pro on TechNet. I would recommend posting your query in the TechNet Forums to get help:

    Windows 7 security TechNet Forums

    Let us know if you need help with Windows related issues. We will be happy to help you.

  • Is it possible to avoid the or in this sql?

    Hello

    I have a subquery to work which is givng me some performance issues... (I've changed the names of tables and columns).
    select h.name, h.age, h.sex, h.height, h.occupation
      from human h
     where h.newest = 'Y'
       and h.death_date is null
       and (i_department_ids is null or
           (i_department_ids is not null and
           h.unique_id in
           (select m.unikt_id
                from departments d
               where d.department_id like i_department_ids)) and
           (INSTR(i_apartment_numbers, aki.apartment_id) > 0 or
           i_apartment_numbers is null))
    i_department_ids and i_apartment_numbers can be null at the time, but not both at the same time, it is also checked. My problem is with two operators OR . As soon as I have the OR, a full scan is completed. A search can take as long as 13 seconds. Without the operators OR there 0,0062 dry. I use the OR operators because, if the input variable is zero, the condition must return True.

    If we scan a way I can avoid using the two operators OR , so I'll avoid the fulltable?

    Thank you very much

    William

    A shooting blind. Try this.

     select h.name, h.age, h.sex, h.height, h.occupation
       from human h
      where h.newest = 'Y'
        and h.death_date is null
        and case when i_department_ids is null then 1
                 when i_department_ids is not null and
                         h.unique_id in
                         (select m.unikt_id
                              from departments d
                             where d.department_id like i_department_ids))
                               and INSTR(nvl(i_apartment_numbers,aki.apartment_id), aki.apartment_id) > 0) then 1
                 else 0 end = 1
     
    

    Published by: Karthick_Arp on November 3, 2010 05:42

    Included the Toon conditino aswell.

  • Is it possible to avoid the "" Record 1: discarded - failed all the clauses WHEN. ' "

    When using when clause sqlldr. It generates too many lines as below-

    "Record 1: discarded - failed all WHEN clauses."

    "" Sheet 2: discarded - failed all WHEN clauses. ""

    "" Record 3: discarded - failed all WHEN clauses. ""

    ' Record 4: discarded - failed all WHEN clauses. »


    If she rejects millions of records. in the log file, it shows millions of lines. size of the log file is too big.

    He takes seriously the space on my hard drive.

    at the same time I need other details in the log-file

    125466 lines loaded successfully.

    0 rows not loaded due to data errors.

    65523 lines not loading because all WHEN clauses were failed.

    0 rows not populated because all fields are null.

    Run started on Fri Jan 23 12:27:16 2015

    Run finished Fri Jan 23 12:27:18 2015

    Time was: 00:00:01.70

    Time processor was: 00:00:01.16

    None of the parameters of SQLLDR to avoid these lines...?

    Oracle 11.2.0.1.0

    Windows 2008

    Although you can use SILENT = RELEASES in your SQL * Loader command line to remove the output to the screen, as much as I know there is no way to remove in your log file.  However, if you use an external table, you can use NOLOGFILE, but which eliminates the whole logfile, not only releases and requires that the data file is on the server, not the client.

  • Is it possible to get the beautiful look of SL in El Cap?

    People - as much as I hated it, progress and work and and apps required me to go to El Cap (which I hate functionally and visually).

    Function I'll adapt to- but is it possible (3rd party applications or other) to get the color and spice and the old Wharf of snow in El Cap tilted? If I have to look at it, I would appreciate the Visual. (I remember there was an app that made the Mavs a little more pleasant to the eye, but could find nothing to El Cap).

    I would never recommend using utilities or third-party modules to change the appearance of Mac OS X. These programs may be dysfunctional in the operating system. OS X keep it as simple as possible to avoid the problems related to the BONE.

    You me confusing on the "inclined platform. Not something that I remember. If you're dead set on the pleasure of the eyes, then you will need to look to third-party software for that. There are many out there depending on what you want. Third-party software for Mac download sites are CNETDownload and MacUpdate. The latter you must take care to download:

    How to use safely Macupdate download without advertising

    This site has both free and paid members accounts. If you don't have then some software will be distributed in a wrapper for an installation that includes adware/malware, you can not. Such a download may appear on your computer as follows: Firefox installer.dmg. Remove the download and return to the main site where you will find a direct link to the Web site. Use this link to download the software. Or a simpler way is to establish a free subscription or paying to avoid problems getting adware with your download.

  • Avoiding the clues in this query

    Hi I have the following query that produces this execution plan.
    My question is that, given that the optimizer made a complete analysis of table ((je pense que son dû de se connecter par avant dans la requête,...))
    because the full table scan happens why additonally go to the index. avoid access index here how we can save additional time to index will allow you to join.
    I can't help but full table scan because using connect by clause.

    I want to remove access from the index because the optimizer will still choose a full table scan for table prod_dim to step 3
    SELECT  prod_dim_nb, prod_type_nm, prod_fam_cd, prod_cd,
                          prod_shrt_nm, prod_full_nm,
                          LTRIM (SYS_CONNECT_BY_PATH (prod_cd, '/'),
                                 '/'
                                ) product_hierarchy
                     FROM prod_dim
                    WHERE prod_fam_cd = 'ABC'
               START WITH prod_dim_nb = prnt_prod_dim_nb
               CONNECT BY NOCYCLE prnt_prod_dim_nb = PRIOR prod_dim_nb
               
       
    PLAN_TABLE_OUTPUT
     
    -----------------------------------------------------------------------------------------------
    | Id  | Operation                      | Name         | Rows  | Bytes | Cost (%CPU)| Time     |
    -----------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT               |              |     3 |   258 |     2   (0)| 00:00:01 |
    |*  1 |  FILTER                        |              |       |       |            |          |
    |*  2 |   CONNECT BY WITH FILTERING    |              |       |       |            |          |
    |*  3 |    TABLE ACCESS FULL           | PROD_DIM     |     1 |    86 |     3   (0)| 00:00:01 |
    |   4 |    NESTED LOOPS                |              |       |       |            |          |
    |   5 |     CONNECT BY PUMP            |              |       |       |            |          |
    |   6 |     TABLE ACCESS BY INDEX ROWID| PROD_DIM     |     3 |   258 |     2   (0)| 00:00:01 |
    |*  7 |      INDEX RANGE SCAN          | PROD_DIM_FK2 |     3 |       |     1   (0)| 00:00:01 |
    -----------------------------------------------------------------------------------------------
    
    
       
    is my understanding... do we really need to go to the index when its goes not for full access to the table in step 3 in the plan? How to avoid the 6 and 7?

    Published by: raj_fresher on September 3, 2009 15:52

    I checked all the columns in the select clause, and they are not null columns

    But the optimizer does not know that (unless you have NO constraints of NULL in all your columns).

    but he's still going for full table access

    This is not surprising. Your table is extremely low (or at least the optimizer thinks that Yes). It's probably going to be faster for analysis complete one or two blocks from the table to use multiple indexes.

  • Why cannot avoid the sort ORDER BY STOPKEY function index

     
    
    SQL> alter session set nls_language=american;
    
    Session altered.
    
    SQL> create table test_sort(name,object_name) as select 'select',object_name from 
      2  dba_objects;
    
    Table created.
    
    SQL> create index i_test_sort_1 on test_sort(substr(name,0,3),object_name);
    
    Index created.
    
    SQL> exec dbms_stats.gather_table_stats(user,'TEST_SORT');
    
    PL/SQL procedure successfully completed.
    
    SQL> set autot trace
    SQL> select * from (select * from test_sort where substr(name,0,3)='sel' order by 
      2  object_name) where rownum<11;
    
    10 rows selected.
    
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 4202652051
    
    --------------------------------------------------------------------------------
    -------------
    
    | Id  | Operation               | Name      | Rows  | Bytes |TempSpc| Cost (%CPU
    )| Time     |
    
    --------------------------------------------------------------------------------
    -------------
    
    |   0 | SELECT STATEMENT        |           |    10 |   740 |       |   504   (3
    )| 00:00:07 |
    
    |*  1 |  COUNT STOPKEY          |           |       |       |       |
     |          |
    
    |   2 |   VIEW                  |           | 49902 |  3606K|       |   504   (3
    )| 00:00:07 |
    
    |*  3 |    SORT ORDER BY STOPKEY|           | 49902 |  1559K|  3928K|   504   (3
    )| 00:00:07 |
    
    |*  4 |     TABLE ACCESS FULL   | TEST_SORT | 49902 |  1559K|       |    60   (5
    )| 00:00:01 |
    
    --------------------------------------------------------------------------------
    -------------
    
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       1 - filter(ROWNUM<11)
       3 - filter(ROWNUM<11)
       4 - filter(SUBSTR("NAME",0,3)='sel')
    
    
    Statistics
    ----------------------------------------------------------
            139  recursive calls
              0  db block gets
            279  consistent gets
              0  physical reads
              0  redo size
            695  bytes sent via SQL*Net to client
            400  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              5  sorts (memory)
              0  sorts (disk)
             10  rows processed 
    
    sql doesn't choose index ,so I use hint to force oracle choose index
    
    SQL> select * from (select /*+ index(test_sort) */ * from test_sort where substr(name,0,3)='sel'
      2  order by object_name) where rownum<11;
    
    10 rows selected.
    
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 1978014138
    
    --------------------------------------------------------------------------------
    ------------------------
    
    | Id  | Operation                      | Name          | Rows  | Bytes |TempSpc|
     Cost (%CPU)| Time     |
    
    --------------------------------------------------------------------------------
    ------------------------
    
    |   0 | SELECT STATEMENT               |               |    10 |   740 |       |
     22869   (1)| 00:04:35 |
    
    |*  1 |  COUNT STOPKEY                 |               |       |       |       |
                |          |
    
    |   2 |   VIEW                         |               | 49902 |  3606K|       |
     22869   (1)| 00:04:35 |
    
    |*  3 |    SORT ORDER BY STOPKEY       |               | 49902 |  1559K|  3928K|
     22869   (1)| 00:04:35 |
    
    |   4 |     TABLE ACCESS BY INDEX ROWID| TEST_SORT     | 49902 |  1559K|       |
     22424   (1)| 00:04:30 |
    
    |*  5 |      INDEX RANGE SCAN          | I_TEST_SORT_1 | 49902 |       |       |
       278   (1)| 00:00:04 |
    
    --------------------------------------------------------------------------------
    ------------------------
    
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       1 - filter(ROWNUM<11)
       3 - filter(ROWNUM<11)
       5 - access(SUBSTR("NAME",0,3)='sel')
    
    
    Statistics
    ----------------------------------------------------------
              1  recursive calls
              0  db block gets
          22393  consistent gets
              0  physical reads
              0  redo size
            695  bytes sent via SQL*Net to client
            400  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
             10  rows processed
    
    From the explain ,the sql chooses the index,but SORT ORDER BY STOPKEY  doesn't avoid,so oracle
    must read all rows satisfy substr(name,0,3)='sel' ,the I rewrite the sql as the following,we can see 
    that sort ORDER BY STOPKEY does't happen,so oracle return 10 rows fast. 
    
    SQL> select * from (select /*+ index(test_sort) */ * from test_sort where substr(name,0,3)='sel'
      2  order by substr(name,0,3),object_name) where rownum<11;
    
    10 rows selected.
    
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 4154852915
    
    --------------------------------------------------------------------------------
    ---------------
    
    | Id  | Operation                     | Name          | Rows  | Bytes | Cost (%C
    PU)| Time     |
    
    --------------------------------------------------------------------------------
    ---------------
    
    |   0 | SELECT STATEMENT              |               |    10 |   740 |     8
    (0)| 00:00:01 |
    
    |*  1 |  COUNT STOPKEY                |               |       |       |
       |          |
    
    |   2 |   VIEW                        |               |    10 |   740 |     8
    (0)| 00:00:01 |
    
    |   3 |    TABLE ACCESS BY INDEX ROWID| TEST_SORT     | 49902 |  1559K|     8
    (0)| 00:00:01 |
    
    |*  4 |     INDEX RANGE SCAN          | I_TEST_SORT_1 |    10 |       |     3
    (0)| 00:00:01 |
    
    --------------------------------------------------------------------------------
    ---------------
    
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       1 - filter(ROWNUM<11)
       4 - access(SUBSTR("NAME",0,3)='sel')
           filter(SUBSTR("NAME",0,3)='sel')
    
    
    Statistics
    ----------------------------------------------------------
              1  recursive calls
              0  db block gets
             11  consistent gets
              0  physical reads
              0  redo size
            695  bytes sent via SQL*Net to client
            400  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
             10  rows processed

    Jinyu wrote:
    Hi, I think that this may be an optimizer bug 10g or flaw optimizer 10 g, although substr (name, 0, 3) = 'salt' is not selective, but oracle can also use indexes to find the top 10 by object_name result order

    Jinyu,

    Indeed, it seems to be a gap in the mode of optimization 10.2 FIRST_ROWS_n. I could reproduce your problem in 10.2.0.4 and watching the 10053 trace, it looks like that the optimizer does not consider the option "Recost for ORDER (with the HELP of indexes)" where you have a composite index based function. It does when using a 'normal' composite index, and it does - as you mentioned - when using the main column in the ORDER BY expression as well. You don't need to use INDEX indicator in this case, moreover, the recosting for ORDER BY then works very well and chooses the index without specified indicators.

    11 g the "recalculate for ORDER BY" appears again in the first place it looks like an obvious limitation / bug of 10.2.0.3/4 at least.

    Kind regards
    Randolf

    Oracle related blog stuff:
    http://Oracle-Randolf.blogspot.com/

    SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676 /.
    http://sourceforge.NET/projects/SQLT-pp/

  • Impossible to apply the functional base index


    Hi gurus

    For my learning, I am applying the functional index of basic but looks like I'm doing something wrong, see below for my code and appreciate your answers.

    Code example

    DROP TABLE my_table;

    CREATE TABLE my_table

    (

    AA: PRIMARY KEY number 4

    aa_desc VARCHAR2 (30),

    aa_type VARCHAR2 (10)

    ) ;

    CREATE INDEX first_name_idx ON my_table (aa > 10 and upper (aa_desc) = "SA" and aa_type is null).

    Thanks in advance

    Concerning

    Shu

    SQL> create table my_table1
      2    (
      3      aa      number(4) primary key,
      4      aa_desc varchar2(30),
      5      aa_type varchar2(10)
      6    ) ;
    
    Table created.
    
    SQL> create or replace function my_table_check
      2  (
      3    p_aa      in my_table.aa%type
      4  , p_aa_desc in my_table.aa_desc%type
      5  , p_aa_type in my_table.aa_type%type
      6  )
      7  return number
      8  deterministic
      9  as
     10  begin
     11     if (p_aa > 10 and upper(p_aa_desc) = 'SA' and p_aa_type is null) then
     12       return 1;
     13     else
     14       return 0;
     15     end if;
     16  end;
     17  /
    
    Function created.
    
    SQL> create index my_table_idx on my_table1(my_table_check(aa, aa_desc, aa_type));
    
    Index created.
    
    SQL> explain plan for
      2  select *
      3    from my_table1
      4   where my_table_check(aa, aa_desc, aa_type) = 1;
    
    Explained.
    
    SQL> set linesize 130
    SQL> set pagesize 200
    SQL>
    SQL> select * from table(dbms_xplan.display);
    
    PLAN_TABLE_OUTPUT
    ----------------------------------------------------------------------------------------------
    Plan hash value: 3962327877
    --------------------------------------------------------------------------------------------
    | Id  | Operation                   | Name         | Rows  | Bytes | Cost (%CPU)| Time     |
    --------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |              |     1 |    37 |     1   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| MY_TABLE1    |     1 |    37 |     1   (0)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN          | MY_TABLE_IDX |     1 |       |     1   (0)| 00:00:01 |
    --------------------------------------------------------------------------------------------
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       2 - access("V195588"."MY_TABLE_CHECK"("AA","AA_DESC","AA_TYPE")=1)
    Note
    -----
       - dynamic sampling used for this statement
    
    18 rows selected.
    
    SQL>
    
  • exclude pages in the export of indexing?


    Hello, is it possible to export the site without index child pages?

    I need the child to be on the site, but google pages is to list them in the results of the research.

    I want to just the main pages (home, about, services, contact) to be included in search results
    is there a way to get around this?
    Thank you

    Screen Shot 2014-12-15 at 10.46.40 pm.png

    plasticjungle To prevent search engines from indexing specific pages, open the page properties panel. Add the following metadata in the metadata HTMLsection. Go to the Options tab and uncheck include page in sitemap.xml.

  • Need help on rewriting query for the DOMAIN CONTEXT index

    Hello

    I'd be really grateful if someone could give me a tip how to rewrite the query so that the DOMAIN INDEX is executed as the last and not the first... According to the plan to explain it...

    What I want: I want to index FIELD CONTAINS search for text ONLY for ITEMS that are extracted from the inner query (table MS_webarticlecache)...

    Because it seems now DOMAIN INDEx is executed first on all the MS_ARTICLE table and then filtered by inner query ID's...

    This query execution time is now around 86seconds... Inner query has all the indexes for SID_SUBCLIPPING and DATE_ARTICLE... (seen in line 3 of explain plan) If this one is fast and returns the unique id by grouping it and concating keywords...

    Without text... search results are retrieved in 3 seconds...

    DOMAIN index is created with Oracle 11 g FILTER BY ID, ART_DATE... and is on the MS_ARTICLE table and the ORATEXT seen on the sql column...

    Table MS_ARTICLE has 1.8mil lines...
    MS_WEBCACHEARTICLE table has cca. 2 lines of millet


    SQL:
    SELECT A.*, B.KEYWORDS OF
    MS_ARTICLE HAS
    JOIN THE
    (SELECT be, wm_concat (keywords) "KEY words" FROM MS_webarticlecache WHERE SID_SUBCLIPPING IN ('LEK', "KRKA") AND DATE_ARTICLE > = TRUNC(SYSDATE-400) AND DATE_ARTICLE < = TRUNC (SYSDATE) GROUP BY be) B
    WE
    A.ID = B.ID_ARTICLE AND CONTAINS (A.ORATEXT, 'IMMUNAL', 1) > 0

    Here is explain plan:
    Plan
    SELECT STATEMENT ALL_ROWSCost: 1 K bytes: cardinality K 16: 237
    1 FIELD INDEX INDEX (DOMAIN) PRESCLIP. ART_IDX cost: 120
    TABLE 2 ACCESS BY INDEX ROWID TABLE PRESCLIP.MS_ARTICLE cost: cardinality K bytes: 5 775: 237
    3 INDEX RANGE SCAN INDEX PRESCLIP. WEBCACHE_SUBCLIPDATE cost: cardinality 10: 964
    TABLE ACCESS BY INDEX ROWID TABLE PRESCLIP.MS_WEBARTICLECACHE cost 4: 250 octets: 45 K cardinality: 931
    5 INLIST ITERATOR
    Cost of 6 HASH JOIN: 1 K bytes: cardinality K 16: 237
    7 FILTER
    GROUP 8 SORT BY cost: 1 K bytes: cardinality K 16: 237


    Thank you very much for the help.
    Kris

    No, dbms_stats.gather_index_stats should be enough I think. From RECONSTRUCTION vs FULL - on rebuilding mode Oracle rebuilt just the table $I from scratch (it creates a temporary table, fills and then current exchanges and the new tables). It should be much faster that the FULL optimization, where the picture remains the same and only its content changes. The resulting table will be more compact, too.

  • I have a very old version of photoshop that I downloaded from a CD for PC. Now, I have a Mac. If I have the serial number, is it possible for me to access the photoshop I bought for PC and download it on my Mac?

    If I have the serial number, is it possible for me to access the photoshop I bought for PC and download it on my Mac? I was told that I had to update my old software for photoshop, but I don't know if it is still possible because I do not have access to a PC. Thank you!

    Windows programs do not run on a Mac, or vice versa

    You buy a new program that is specific to Mac

    In addition, unless you want to buy software 3 year and longer, it is NOT being updated you must purchase a subscription to a Cloud program... the special program of photography is $ 10 per month

    Link to buy 3 + years CS6 via phone http://www.adobe.com/products/cs6.html

    Cloud Plans https://creative.adobe.com/plans

    PS - to clarify the future, downloading is what you do to get a file from a Web site to your computer... The installation is that you ask the subject

  • Is it possible to lock the start of Windows 8 on a monitor screen while accessing the office on another?

    Running HP EliteBook 8560w using the screen of the laptop and HP 2709 m as second screen; running Windows 8 x 64. I try to add a third monitor if it is possible to lock the start of Windows 8 on one screen.

    Thank you

    No, it is not possible then.

    But, if she were here, it would have been a great feature.

    Concerning

  • How to avoid the focus problem when browsing via browser back button

    Hello

    I am facing a problem in setting focus on the buttons.
    Please see application: http://apex.oracle.com/pls/otn/f?p=47869:2

    login details:
    Workspace: vsanthanam
    user: vijay
    PSWD: apex_demo

    In this application, I have 2 pages.
    #2 has the "submit" button
    Page no. 3 contains the Cancel button

    The two buttons are basic HTML and can be accessed using access key ALT + s and ALT + c.

    The problem is:
    When I go back to the previous page (pgid #2) of the application using back button of the browser pgid IE #3.
    due to the onFocus event located in the button "submit", control returns to pgid #3.

    Is there a possible way to set the focus to other elements. so that whenever IE brower back button, application would stay in
    page #2.


    I took approaches:
    -------------------------
    If we use onclick, onfocus instead and then the problem remains because we have onfocus = "this.click (); in equipping the Accesskey.
    Another way is onKeyup event. If we use onKeyup, we can avoid this browser back problem, but disappears from the access keys functions.

    Pointers on this would be a great help.

    Thank you very much
    -Vijay

    PLEASE NOTE: I have created intentionally two buttons on each page. It is necessary to have HTML buttons with the key features of access,
    otherwise application gives a few flaws in HTML accesskey.

    Hi Vijay,

    Crikey, aren't annoying browsers! It took a while to get out, but I've updated your SUBMIT1 button attributes:

    class="t20Button" AccessKey="s" tabindex="-1" onclick="javascript:this.blur();doSubmit('SUBMIT1');" onfocus="javascript:this.blur();doSubmit('SUBMIT1');"
    

    Note that I removed the spare semicolons you after each attribute - these are only required in javascript code.

    The important point to note are the statements of "this.blur" () - this tells the browser to move away from the current item to the next. On your page, only for this purpose, I have added a text element of Temp - I am assuming that your actual page will have at least one other element on the page that will accept the focus? Everything gets focus of the call "this.blur ()", should be the element with focus when the Back button is used.

    Andy

Maybe you are looking for