Partitioned index not used in the query

Hello

Oracle 10.2.0.1
Windows xp

I'm confused why oracle did not use a partitioned below index:
SQL> set line 200;
SQL> SET AUTOTRACE TRACEONLY EXPLAIN;
SQL> select * from MYTABLE where PROD like 'SOAP%';

Execution Plan
----------------------------------------------------------
Plan hash value: 2899783245

-------------------------------------------------------------------------------------------------------
| Id  | Operation              | Name         | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
-------------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT       |              |  1852 |   115K|   992   (3)| 00:00:12 |       |       |
|   1 |  PARTITION RANGE SINGLE|              |  1852 |   115K|   992   (3)| 00:00:12 |     8 |     8 |
|*  2 |   TABLE ACCESS FULL    |      MYTABLE |  1852 |   115K|   992   (3)| 00:00:12 |     8 |     8 |
-------------------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - filter("PROD" LIKE 'SOAP%')

SQL> desc MYTABLE;
 Name                                                                                  Null?    Type
 ------------------------------------------------------------------------------------- -------- -----------
 PROD_ID                                                                               NOT NULL VARCHAR2(7)
 PROD                                                                                  NOT NULL VARCHAR2(30)
 AREA                                                                                  NOT NULL VARCHAR2(30)
 SUB_AREA                                                                              NOT NULL VARCHAR2(30)

SQL>
But when I said something different; then it accesses the indexes:
SQL> select count(*) from MYTABLE where PROD like 'SOAP%';

Execution Plan
----------------------------------------------------------
Plan hash value: 1393798969

----------------------------------------------------------------------------------------------------
| Id  | Operation               | Name     | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
----------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT        |          |     1 |    16 |    18   (0)| 00:00:01 |       |       |
|   1 |  SORT AGGREGATE         |          |     1 |    16 |            |          |       |       |
|   2 |   PARTITION RANGE SINGLE|          |  1852 | 29632 |    18   (0)| 00:00:01 |     8 |     8 |
|*  3 |    INDEX RANGE SCAN     | PROD_IDX |  1852 | 29632 |    18   (0)| 00:00:01 |     8 |     8 |
---------------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   3 - access("PROD" LIKE 'SOAP%')
       filter("PROD" LIKE 'SOAP%')

SQL>
How to create prod_idx:
SQL> ED
Wrote file afiedt.buf

  1  create index prod_idx ON mytable(prod)
  2  global partition by range(prod)
  3  (partition prod1 values less than ('A'),
  4  partition prod2 values less than ('B'),
  5  partition prod3 values less than ('C'),
  6  partition prod4 values less than ('D'),
  7  partition prod5 values less than ('E'),
  8  partition prod6 values less than ('F'),
  9  partition prod7 values less than ('G'),
 10  partition prod8 values less than ('H'),
 11  partition prod9 values less than ('I'),
 12  partition prod10 values less than ('J'),
 13  partition prod11 values less than ('K'),
 14  partition prod12 values less than ('L'),
 15  partition prod13 values less than ('M'),
 16  partition prod14 values less than ('N'),
 17  partition prod15 values less than ('O'),
 18  partition prod16 values less than ('P'),
 19  partition prod17 values less than ('Q'),
 20  partition prod18 values less than ('R'),
 21  partition prod19 values less than ('S'),
 22  partition prod20 values less than ('T'),
 23  partition prod21 values less than ('U'),
 24  partition prod22 values less than ('V'),
 25  partition prod23 values less than ('W'),
 26  partition prod24 values less than ('X'),
 27  partition prod25 values less than ('Y'),
 28  partition prod26 values less than ('Z'),
 29* partition prod27 values less than (MAXVALUE))
SQL> /

Index created.
SQL> select count(*) from MYTABLE;

Execution Plan
----------------------------------------------------------
Plan hash value: 3323402158

--------------------------------------------------------------------------------------------------------------
| Id  | Operation                      | Name                | Rows  | Cost (%CPU)| Time     | Pstart| Pstop |
--------------------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT               |                     |     1 |   311   (0)| 00:00:04 |       |       |
|   1 |  SORT AGGREGATE                |                     |     1 |            |          |       |       |
|   2 |   PARTITION RANGE ALL          |                     |    14M|   311   (0)| 00:00:04 |     1 |    27 |
|   3 |    BITMAP CONVERSION COUNT     |                     |    14M|   311   (0)| 00:00:04 |       |       |
|   4 |     BITMAP INDEX FAST FULL SCAN| MS_IDX_MYTABLE      |       |            |          |     1 |    27 |
--------------------------------------------------------------------------------------------------------------
Table is to have 14693792 lines.

Why this is the case, please guide me to understand. Thank you.

Published by: user12050217 on July 29, 2010 23:37

Published by: user12050217 on July 29, 2010 23:38

Tags: Database

Similar Questions

  • Structured XMLIndex not used by the query

    Hello

    We try to use XMLIndexes structured for a query. But they are not used. A sample of similar work is as follows:


    -Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    Example of XML data on the XMLTYPE column is:

    <?xml version="1.0" encoding="UTF-8" standalone='yes'?>  
    <abc:tagOne preparationTime="2012-10-17T13:01:23.000Z" schemaVersion="1.3.9.0" xsi:schemaLocation="" xmlns:def="DEF" xmlns:abc="ABC"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">  
        <def:tagTwo>  
            <def:tagThree id="Identity1">  
                <def:Section domain="Domain123">10000</def:Section>  
            </def:tagThree>  
            <def:tagThree id="Identity2">  
                <def:Section domain="Domain123">20000</def:Section>  
            </def:tagThree>  
            <def:tagThree id="Identity3">  
                <def:Section domain="Domain123">30000</def:Section>  
            </def:tagThree>  
            <def:tagThree id="Identity4">  
                <def:Section domain="Domain123">40000</def:Section>  
            </def:tagThree>  
        </def:tagTwo>  
    </abc:tagOne>
    
    
    
    
    



    Query is like:

    select  XMLAGG(XML_MESSAGE)  
        from INT_PART_TABLE  
        where XMLExists('  
            declare namespace abc="ABC";  
            declare namespace def="DEF";  
            $Message/abc:tagOne/def:tagTwo/def:tagThree[@id="Identity4"][def:Section[@domain="Domain123"]  = ("50000", "40000") ]'  
            passing  
            xML_mESSAGE as "Message"  
        )
    
    
    
    
    


    We try to create indexes structured on the column of xmltype, as defined in the XML example file:

    CREATE INDEX INT_PART_TABLE_SXI
       ON INT_PART_TABLE (XML_MESSAGE)
       INDEXTYPE IS XDB.XMLINDEX
          PARAMETERS ('XMLTABLE INT_PART_content_table_01
                               XMLNAMESPACES (''ABC'' AS "abc",
                                              ''DEF'' AS "def"),  
                               ''/abc:tagOne/def:tagTwo''
                       COLUMNS
                         xmltagTwo      XMLTYPE  PATH ''/abc:tagOne/def:tagTwo''  VIRTUAL
                       XMLTABLE INT_PART_content_table_02
                         XMLNAMESPACES (''DEF'' AS "def"),
                         ''/def:tagTwo''
                                PASSING xmltagTwo
                                 COLUMNS 
                                 xmltagThree     XMLTYPE  PATH ''/def:tagThree''   VIRTUAL
                       XMLTABLE INT_PART_content_table_03
                          XMLNAMESPACES (''DEF'' AS "def"),    
                          ''/def:tagThree''
                             PASSING xmltagThree
                               COLUMNS 
                               section number PATH ''def:Section'',
                               domain varchar2(20) PATH ''@domain'',
                               id varchar2(20) PATH ''@id''
                  ')local;
    
    
    
    
    

    Table structure:

    CREATE TABLE INT_PART_TABLE
    (
       DB_ID            VARCHAR2 (10 BYTE),
       xML_mESSAGE      SYS.XMLTYPE,
       LOAD_TIMESTAMP   TIMESTAMP (6)
    )
    XMLTYPE xML_mESSAGE
       STORE AS BINARY XML
       (ENABLE STORAGE IN ROW
        CHUNK 16384
        RETENTION
        CACHE READS NOLOGGING)
       ALLOW NONSCHEMA
       DISALLOW ANYSCHEMA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (BUFFER_POOL DEFAULT)
    PARTITION BY RANGE (LOAD_TIMESTAMP)
       (PARTITION P_12092012 VALUES LESS THAN (TIMESTAMP ' 2012-09-12 00:00:00')
           LOGGING
           NOCOMPRESS
           PCTFREE 10
           INITRANS 1
           MAXTRANS 255
           STORAGE (INITIAL 512 K
                    NEXT 512 K
                    MINEXTENTS 1
                    MAXEXTENTS UNLIMITED
                    PCTINCREASE 0
                    BUFFER_POOL DEFAULT),
        PARTITION MAX VALUES LESS THAN (MAXVALUE)
           LOGGING
           NOCOMPRESS
           PCTFREE 10
           INITRANS 2
           MAXTRANS 255
           STORAGE (INITIAL 128 K
                    NEXT 128 K
                    MINEXTENTS 1
                    MAXEXTENTS UNLIMITED
                    PCTINCREASE 0
                    BUFFER_POOL DEFAULT))
    PARALLEL (DEGREE 8 INSTANCES 1);
    
    
    
    
    

    - But the query above does not use the XMLINDEX STRUCTURE and instead turns to FTS INT_PART_TABLE.  Please help here.

    Is it the wrong way I created structured Index.

    (I tried a few other ways where I got-> ORA-19279: XPTY0004 - dynamic XQuery type mismatch: expected - singleton sequence got several sequence element).

    S ' Please NOTE that I used two "VIRTUAL" during the creation of the Index as otherwise I was getting the error:
    ORA-29958: fatal error occurred in the execution of routine ODCIINDEXCREATE
    ORA-30984: the XMLType column must be declared as virtual

    Please suggest. Thank you.

    Finally some time to watch this...

    The following works for me:

    Connected to:

    Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    With partitioning, OLAP, Data Mining and Real Application Testing options

    SQL > create table (int_part_table)

    2 db_id varchar2 (10 byte)

    3, xml_message xmltype

    4, load_timestamp timestamp (6)

    5)

    store xml_message 6 xmltype to the binary xml format

    7 partition by range (load_timestamp)

    () 8

    9 lower values p_12092012 partition to (to_timestamp ('2012-09-12 00:00:00 ',' YYYY-MM-DD HH24:MI:SS'))))

    10, partition p_max values less than (maxvalue)

    11)

    12 parallel (degree 8 instances 1);

    Table created.

    SQL > create index int_part_table_sxi on int_part_table (xml_message)

    2 indextype is xdb.xmlindex

    3 rooms

    4 parameters (q'~)

    5 XMLTABLE int_part_content_table_01

    6 XMLNAMESPACES ('ABC' AS 'abc', 'DEF' AS 'def'),

    7 ' / abc: Tallet / def:tagTwo / def:tagThree'

    8 COLUMNS

    9 article binary_double PATH 'def:Section '.

    10, area varchar2 (20) PATH 'def:Section/@domain '.

    11, id varchar2 (20) PATH '@id '.

    12 ~');

    The index is created.

    SQL >

    SQL >

    SQL > insert into int_part_table values)

    2 '1'

    3, xmltype (')

    4

    ' NS:ABC = 'ABC' xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" > ".

    5

    6

    7              10000

    8

    9

    10 20000

    11

    12

    13 30000

    14

    15

    16 40000

    17

    18

    19 ')

    20, systimestamp

    (21);

    1 line of creation.

    SQL > commit;

    Validation complete.

    SQL > exec dbms_stats.gather_table_stats (user, 'INT_PART_TABLE');

    PL/SQL procedure successfully completed.

    SQL >

    SQL >

    SQL > set autotrace traceonly explain

    SQL > set lines 200

    SQL > define pages 100

    SQL >

    SQL > select / * + no_parallel * / xml_message

    2 of int_part_table

    3 where (XMLExists)

    4 ' declare namespace abc = "ABC"; (::)

    5 declare def namespace = "DEF"; (::)

    /ABC:tagOne/def:tagTwo/def:tagThree[@ID="Identity4 6 '.

    7 and def:Section/@domain="Domain123.

    8 and (def:Section = 40000

    9 or def:Section = 50000)]"

    10 passage xml_message

    11        ) ;

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 3112612945

    ---------------------------------------------------------------------------------------------------------------------------------

    | ID | Operation | Name                      | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |

    ---------------------------------------------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                           |     1.   417.    15 (0) | 00:00:01 |       |       |

    |   1.  SEMI NESTED LOOPS.                           |     1.   417.    15 (0) | 00:00:01 |       |       |

    |   2.   RANGE OF PARTITION ALL THE |                           |     1.   367.    14 (0) | 00:00:01 |     1.     2.

    |   3.    TABLE ACCESS FULL | INT_PART_TABLE |     1.   367.    14 (0) | 00:00:01 |     1.     2.

    |   4.   ITERATOR SYSTEM PARTITION.                           |     1.    50.     1 (0) | 00:00:01 |   KEY |   KEY |

    |*  5 |    TABLE ACCESS BY LOCAL INDEX ROWID | INT_PART_CONTENT_TABLE_01 |     1.    50.     1 (0) | 00:00:01 |   KEY |   KEY |

    |*  6 |     INDEX RANGE SCAN | SYS78560_78563_RID_IDX |     1.       |     0 (0) | 00:00:01 |   KEY |   KEY |

    ---------------------------------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    5 - filter("SYS_SXI_0".") ID "="Identity4"AND ("SYS_SXI_0"". ")" SECTION "IS 4.0E + 004 D OR 'SYS_SXI_0'." SECTION "(= 5.0E + 004 D) AND"

    'SYS_SXI_0 '. ("DOMAIN"="Domain123")

    6 - access ("INT_PART_TABLE". ROWID = "SYS_SXI_0." ("' RID ')

    filter (TBL$ OR$ IDX$ PART$ NUM ("DEV".) "INT_PART_TABLE", 0,0,0, "INT_PART_TABLE". ROWID) TBL = $ OR$ IDX$ PART$ NUM ("DEV". "INT_PAR

    T_CONTENT_TABLE_01", 0,0,0,"SYS_SXI_0. " ROWID))

    A few things to know:

    -use BINARY_DOUBLE datatype to untyped (i.e. not based on a diagram) the numerical values of the XML index.

    -J' developed the sequence iterator predicate you were using for a Boolean expression GOLD. Otherwise, the index is not used as intended.

    You can also create a secondary index that satisfies the predicate #5 (see red part above):

    SQL > create index int_part_content_table_01_ix1

    2 on local int_part_content_table_01 (id, field, section);

    The index is created.

    SQL >

    SQL > select / * + no_parallel * / xml_message

    2 of int_part_table

    3 where (XMLExists)

    4 ' declare namespace abc = "ABC"; (::)

    5 declare def namespace = "DEF"; (::)

    /ABC:tagOne/def:tagTwo/def:tagThree[@ID="Identity4 6 '.

    7 and def:Section/@domain="Domain123.

    8 and (def:Section = 40000

    9 or def:Section = 50000)]"

    10 passage xml_message

    11        ) ;

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 3704965392

    --------------------------------------------------------------------------------------------------------------------------------------

    | ID | Operation | Name                          | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |

    --------------------------------------------------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                               |     1.   417.     4 (25) | 00:00:01 |       |       |

    |   1.  NESTED LOOPS |                               |     1.   417.     4 (25) | 00:00:01 |       |       |

    |   2.   UNIQUE FATE |                               |     2.   100.     2 (0) | 00:00:01 |       |       |

    |   3.    SYSTEM PARTITION ALL |                               |     2.   100.     2 (0) | 00:00:01 |     1.     2.

    |   4.     TABLE ACCESS BY LOCAL INDEX ROWID | INT_PART_CONTENT_TABLE_01 |     2.   100.     2 (0) | 00:00:01 |     1.     2.

    |*  5 |      INDEX RANGE SCAN | INT_PART_CONTENT_TABLE_01_IX1 |     1.       |     1 (0) | 00:00:01 |     1.     2.

    |*  6 |   TABLE ACCESS BY ROWID USER | INT_PART_TABLE |     1.   367.     1 (0) | 00:00:01 | ROWID | ROWID |

    --------------------------------------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    5 - access("SYS_SXI_0".") ID '= 'Identity4' AND 'SYS_SXI_0'." DOMAIN "=" Domain123 ")

    filter ("SYS_SXI_0". "SECTION"IS 4.0E + 004 D OR 'SYS_SXI_0'." SECTION "(= 5.0E + 004 D)"

    6 filter (TBL$ OR$ IDX$ PART$ NUM ("DEV".) "INT_PART_TABLE", 0,0,0, "INT_PART_TABLE". ROWID) TBL = $ OR$ IDX$ PART$ NUM ("DEV". "INT_PART_CON

    TENT_TABLE_01", 0,0,0,"SYS_SXI_0. " ROWID))

  • How we force a query to use transparently a hint, even if the index is not given in the query as a query rewriting.

    How we force a query to use transparently a hint, even if the index is not given in the query as a query rewriting.

    For example:

    If the user runs a query select deptno, avg (sal) from emp group by deptno;

    We want the optimizer to use a hint of result_cache with this request, and it should be transparent to the user.

    Query should be rewritten to seamlessly

    Select / * + result_cache * / deptno, avg (sal)

    WCP

    Group of deptno;

    How can this feature we make? Please advice.

    I checked the possibility of SPM and contours, but it is not clear if this rewrite is possible here.

    Thank you and best regards,

    Vikas Krishna

    Surely dbms_advanced_rewrite is designed for this situation?

  • Remote index not used with INSERT in the local table on dblink

    Hi all

    I don't know if anyone has come across this problem before, but for some reason any the remote index remains unused ONLY* in the insertion on the local database operation. Let me explain this pseudo-device code

    insert into LOCAL_TABLE
    Select / * + index_combine (alias_remote_tab IDX_LOG_DATE) * /.
    trunc (log_datetime),
    Count (*)
    of REMOTE_TABLE@DBLINK alias_remote_tab
    When trunc (log_datetime) = trunc(sysdate-1)
    Trunc Group (log_datetime);

    where:
    REMOTE_TABLE is a table partitioned on log_datetime (monthly)
    IDX_LOG_DATE is an index of bitmap of based on a valid function on log_datetime created in the trunc (log_datetime)
    local database: 10 gr 2
    remote database: 11 GR 1 material
    OS: windows (both)

    More funny thing is when I just run the select query independently on the only both local and remote, the index is used. I checked by printing the command explain for the select query plan. But when I prefix the query with the insert lose all hell breaks and local database plays the ignorance about the index. The command for the insert query explain plan has no mention of the index even when I explicitly place the index indicator in the select part of the query.

    If this should not be simple enough for ORACLE? Am I missing something here?

    Jonathan describes the details and the reasons for the behavior you see in following blog post http://jonathanlewis.wordpress.com/2008/12/05/distributed-dml/
    Your SELECTION is performed remotely (filtering and grouping) and sends only the (relatively) small results via dblink local database while the in an INSERTION, filtering only occurs at the remote and data site (relatively) important are sent via dblink to the local database, the consolidation takes place.
    You can give a try to the approach proposed by michaels2. If the approach from the view result grouping and filtering which will take place in the remote database, you will see improved performance.

    PS BTW, if the sql code that I suggested to check the plane, in my previous post using an index, then the cause of your performance issue is certainly not due to the index not used and is due to the amount of data transferred to dblink.

  • I'm not able to merge the partition not used to the local disk partition

    I'm using windows xp service pack 3 and I have deleted my partitions from disk 2, but im not able to merge the partition not used to the local disk partition, what should I do?

     
    Original title: HELP ASAP!

    Hi Joseph.

    Suggestion of PML in the thread below, can be very useful.

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-performance/how-do-i-merge-two-partitions-in-XP/d2a7fa28-b2dc-41F6-9cd3-2c2beb6c6865

  • Tuning for sql join key table no consumer of the heavy use of the query processor

    Obligation comes to tunne prod of the query in

    high use of the query processor

    sql_id: fp79wb32h7a6t

    Module: AHC, P_PatientDQ()

    Cost: 7

    Elapsed time: hung

    Status: Hung, 35,253,460 day at 30 minute intervals

    -Create table

    create table ahc. PATIENTVISITS

    (

    ahcid NUMBER,

    visitId NUMBER,

    visitstatus NVARCHAR2 (100),

    visitdate DATE,

    visitintime DATE,

    visitouttime DATE

    )

    -Create/recreate the index

    create indexes ahc. F1_PATIENTVISIT_AHCID on ahc. PATIENTVISITS (AHCID, VISITID);

    create indexes ahc. VISITDATE_IDX on ahc. PATIENTVISITS (TRUNC (VISITDATE));

    First total number of table

    Select count (1) of

    Pvs AHC.patientvisits

    -Save County 1387485

    create table ahc. PATIENTDEPENDENTVISITS

    (

    ahcid NUMBER (19) not null,

    IDPack NUMBER (10) not null,

    visitId NUMBER (19) not null,

    dependentvisitid NUMBER (19) not null,

    isdiabetic NUMBER (2)

    )

    -Create/recreate the index

    create indexes ahc. K1_PATIENTDEPENDENT_AHCID on ahc. PATIENTDEPENDENTVISITS (AHCID);

    Total number of second table

    Select count (1) of

    AHC.patientdependentvisits POS

    -Save County 774599

    Original request:

    SELECT count (*)

    ACH. PVS PATIENTVISITS

    WHERE PVS. VISITID IN (SELECT POS. DEPENDENTVISITID

    ACH. PATIENTDEPENDENTVISITS POS

    WHERE POS. AHCID = 37

    AND POS. VISITID = 218

    AND POS. ISDIABETIC = 0)

    AND SUPERIOR (PVS. VISITSTATUS) = 'PENDING'

    AND PVS. AHCID = 37

    Count (1)

    -----------

    1

    PL/sql Developer explain plan for the original query

    Owner of description Objects_name cost cardin bytes cpucost cost of e/s

    SELECT STATEMENT, GOAL = ALL_ROWS7141636697
    AGGREGATION OF TRI141
    SEMI OF THE NESTED LOOPS7141636697
    TABLE ACCESS BY INDEX ROWIDAHCPATIENTVISITS4125332954
    INDEX RANGE SCANAHCF1_PATIENTVISIT_AHCID39231643
    TABLE ACCESS BY INDEX ROWIDAHCPATIENTDEPENDENTVISITS3116303753
    INDEX RANGE SCANAHCK1_PATIENTDEPENDENT_AHCID214180932

    After editing the query

    SELECT / * + FIRST_ROWS * / COUNT (1)

    ACH. PVS PATIENTVISITS

    JOIN THE AHC. PATIENTDEPENDENTVISITS POS ON PVS. VISITID = POS. DEPENDENTVISITID

    WHERE PVS. AHCID = POS. AHCID

    AND POS. AHCID = 37

    AND POS. VISITID = 218

    AND POS. ISDIABETIC = 0

    AND SUPERIOR (PVS. VISITSTATUS) = 'PENDING'

    Count (1)

    -----------

    1

    PL/sql Developer explain plan for change request

    Owner of description Objects_name cost cardin bytes cpucost cost of e/s

    SELECT STATEMENT, TARGET = TIP: FIRST_ROWS7141592577
    AGGREGATION OF TRI141
    NESTED LOOPS
    NESTED LOOPS7141592577
    TABLE ACCESS BY INDEX ROWIDAHCPATIENTDEPENDENTVISITS4116366464
    INDEX RANGE SCANAHCK1_PATIENTDEPENDENT_AHCID314243643
    INDEX RANGE SCANAHCF1_PATIENTVISIT_AHCID21152932
    TABLE ACCESS BY INDEX ROWIDAHCPATIENTVISITS3125226113

    here after I changed the query no display cost = 7 io wait = improvement also 7 can someone please help these

    How to adjust or rewrite lots of join not keys to multiple records on table table

    Thank you

    VSM

    you have not answered my question. Are you really calling it 35 million times in 30 minutes?

    If so, why?

  • Can I remove Logical columns that I will not use in the layer of presentation as the id or foreign key columns?

    Hello

    Can I remove Logical columns at the level of the business layer that I'm not going to use the layer of presentation as the ID or foreign key columns? It will not affect the relations to the business layer?

    Kind regards

    Nestor

    Hi Nestor,.

    It won't unless they are used as keys, columns sort order, the ID column or the likes. But you can leave them in the MDB layer and expose just in the presentation layer - just in case you need it later. It is not use all the resources or generate overhead. More: Developer of the RPD should be used to work with loads of columns

  • Document windows does not use all the available on new monitor display area

    Hello

    I have a new monitor - a Benq BL2711.

    I have set up as my secondary monitor on display in Windows 8.

    I can put Photoshop (CS6) on this screen and maximize the it, but there is a vast space not used in the document window, which is not used. I want to show a lot more of my images that I can currently, but the document window will not only fill all that screen real estate. A large part of it is lost.

    The panels occupy the right space to the bottom of the screen, but the window of the document (or the display area?) uses only 60% of the height of the screen.

    What is a limitation or do I have to configure something? (I have reset the workspace of photography).

    Thanks for any help

    Nick

    It is really a shot in the water, but it's the space used by the "timeline" Panel when it is open. Try to check in the menu window and close the bottle.

    Other that that, there are always some good old Reset preferences. Make sure you save the custom actions/brushes/presets and so forth first!

  • A way to show items that are not used in the sequence

    Hello world

    is there a way to display items that are not used in the sequence.

    in order not to forget the "rushes" in the Assembly?

    my best,

    Turn on the use Audio and video columns in the sandbox and then sort by those.

  • May not use all the available space in the data store

    Hello

    We have a HP DL580 G7 Server P410i raid controller with 8 x 1 TB HDD.

    I create a raid 1 with 2 hard drives (1 TB) and raid 5 with 6 hard drives (5 TB) and install ESXi 5.1 in the first data store (1 to).

    After installation when I tried to create the 5 TB data store, (ESXi detects and displays the space available 5 TB) it does use that almost 2.5 TB! and may not use all the space

    I also installed the ESXi 5.5 but still no luck.

    This Ko seems to apply to you: http://kb.vmware.com/kb/2006942

  • I want to insuscribe because I do not use of the applications. Thank you

    I want to insuscribe because I do not use of the applications. Thank you

    In order to cancel the order, please contact customer service

    You can use: http://helpx.adobe.com/x-productkb/global/phone-support-orders.html

    For more information on cancellation: cancel your creative cloud membership

  • can I install PES 11 on two laptops that are not used in the same place?

    Can I install PES 11 on two laptops that are not used in the same place or at the same time?

    Yes, your license entitles you to two simultaneous activations.

  • FBI and XMLINDEX not use by the optimizer

    Hello

    I've created a function based index but optimizer is never using my index and found for BINARYXML FBI is not suggested rather THAN XMLINDEX is good, it seems does not work for me, but even.

    I tried to use tips but doesn't help me at all. Any suggestions would be really useful.

    SQL > show parameter index

    VALUE OF TYPE NAME
    ------------------------------------ ----------- ------------------------------
    optimizer_index_caching integer 0
    OPTIMIZER_INDEX_COST_ADJ integer 1
    optimizer_use_invisible_indexes boolean FALSE
    skip_unusable_indexes Boolean TRUE
    SQL >

    SQL > desc FXXX_SEC_POS_FB
    Name                                                                                  Null?    Type
    ------------------------------------------------------------------------------------- -------- ----------------------------------------------------------
    RECID A NOT NULL VARCHAR2 (255)
    XMLRECORD                                                                                      SYS. XMLTYPE BINARY STORAGE

    SQL >

    SQL * more: Production release 11.2.0.4.0 Wed Feb 11 06:34:39 2015

    Copyright (c) 1982, 2013, Oracle.  All rights reserved.


    Connected to:
    Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production
    With partitioning, OLAP, Data Mining and Real Application Testing options

    INDEX_NAME INDEX_TYPE VISIBILITY FUNCIDX_ DOMIDX_MANAGEM
    ------------------------------ --------------------------- --------- -------- --------------
    SYS_IL0000174507C00003$ $ LOB VISIBLE
    BASED ON A NORMAL VISIBLE ENABLED FUNCTION IX_FBNK_SEC_POS_FB_C2
    BASED ON A NORMAL VISIBLE ENABLED FUNCTION IX_FBNK_SEC_POS_FB_C81

    SELECT t.RECID FROM FBNK_SEC_POS_FB WHERE SECURITY_NUMBER = t'000566-000' and xmlexists ("$xmlrecvar/row [c81/text () ="US0010001"]' by the WAY ')

    XMLRECORD AS 'xmlrecvar')

    The higher the SQL statement execution Plan:

    Hash value of plan: 4259655978

    --------------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    --------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT |                 |   361K |   738 M |   197K (2) | 00:39:31 |
    |   1.  SEMI NESTED LOOPS.                 |   361K |   738 M |   197K (2) | 00:39:31 |
    |*  2 |   TABLE ACCESS FULL | FBNK_SEC_POS_FB |  4427 |  9247K |  75786 (1) | 00:15:10 |
    |*  3 |   XPATH EVALUATION.                 |       |       |            |          |
    --------------------------------------------------------------------------------------

    Name of the query block / Alias object (identified by the operation identity card):
    -------------------------------------------------------------

    1 SALT$ BCF67709
    2 SALT$ BCF67709 / T@SEL$1

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    2 - filter("SECURITY_NUMBER"='000566-000')
    3 - filter("P".") C_01$ "= 'US0010001')

    Projection of the column information (identified by the operation identity card):
    -----------------------------------------------------------

    1 (#keys = 0) "T". "RECID" [VARCHAR2, 255], "T" "." " SYS_NC00003$ '[LOB, 4000],
    "SECURITY_NUMBER" [VARCHAR2, 12]
    2 - « T ». "RECID" [VARCHAR2, 255], "T" "." " SYS_NC00003$ '[LOB, 4000],
    "SECURITY_NUMBER" [VARCHAR2, 12]
    3 VALUE (A0) [4000]

    Note
    -----
    -dynamic sample used for this survey (level = 2)
    LETTER: SQL: 2:Full: SELECT t.RECID FROM FBNK_SEC_POS_FB WHERE SECURITY_NUMBER = t'000566-000' and xmlexists (' $xmlrecvar/row [c81 / text ()])

    (= "US0010001"]' in PASSING XMLRECORD AS 'xmlrecvar')

    4096 selected records

    You probably won't see the difference in approach...

    I have NOT used and not STRUCTURED XML, but a STRUCTURED index rather XML index...

    • Index unstructured XML when introduced in 11.1 and use an ARRAY of path. Unstructured XML indexes are mainly used for research "blurred".
    • Structured XML indexes where introduced in 11.2 and make use of one or more TABLES of CONTENTS that contain, must contain content of the structured parts in the XML document

    So I have not used

    CREATE INDEX IX_FXXX_AAA_BBB_FB_FB
    ON FXXX_AAA_BBB_FB (XMLRECORD)
    INDEXTYPE IS XDB.XMLINDEX
    PARAMETERS ('  PATH TABLE IX_PATH_TABLE
                    PATHS (  INCLUDE ( /row/c2 /row/c81 ))'
                );
    

    but instead I used a XML structured, based on the function XMLTABLE index

    CREATE INDEX IX_FXXX_AAA_BBB_FB_FB
      ON FXXX_AAA_BBB_FB (XMLRECORD)
    INDEXTYPE IS XDB.XMLINDEX
      PARAMETERS (q'# GROUP SXI_GROUP
                      XMLTABLE SXI_CONTENT_TABLE
                      '/row'
                      COLUMNS
                        C2  VARCHAR2(100)     PATH 'c2'
                      , C81 VARCHAR2(100)     PATH 'c81'
                    #');
    

    On those, I also created EXTRA build secondary indexes on the columns of the TABLE CONTENT with the name 'SXI_CONTENT_TABLE '.

    create index SEC_FXXX_C2_FB on SXI_CONTENT_TABLE(C2);
    create index SEC_FXXX_C81_FB on SXI_CONTENT_TABLE(C81);
    create unique index SEC_FXXX_RIDC2C81_FB on SXI_CONTENT_TABLE(RID, C2, C81);
    

    ...

  • How to make an index to use in a query

    Hello

    I have the query below for which ename column has an index. From my knowledge under 1st and 2st queries will not use index. That's why I used the 3rd statement and that too its not not using the index. Finally, I used the 4th query, but even the 4th query does not use the index. So how do this query to use my index? I need to create an index of function for it? What's the final option?

    1. Select * from emp where ename! = « BH » ;

    2. Select * from emp where ename <>'BH ';

    3. Select * from emp where ename not in ("BH");

    4. Select * from emp where ename < "BH" or ename > 'BH ';

    Kind regards
    007

    Published by: 007 on 6 June 2013 07:56

    Published by: 007 on 6 June 2013 08:06

    Published by: 007 on 6 June 2013 08:06

    Published by: 007 on 6 June 2013 08:06

    Published by: 007 on 6 June 2013 08:12

    Are you asking how to force Oracle to use an index, even if using the index will be the slowest query?

    At least that the vast majority of the rows in your table have a 'BHIOASRACRGBYOBHHNZOARYFGKZOSI' ename, it is extremely unlikely that it would be advantageous to use an index on your third request. It seems likely that Oracle will return almost every row in the table. If this is the case, a table scan will be much more effective.

    Your fourth query contains a syntax error, and it is unclear what that the predicate less is to compare against. Once again, however, if the query should return most of the data in the table, a table scan will be more effective than the use of the index.

    Assuming that ENAME is declared NOT NULL, you may be able to add an indicator of INDEX to force Oracle to use the index. It seems unlikely, however, that you really want to do when it gets the slower query.

    Justin

  • How to manage the incorrect use of the query operators in CONTAINS?

    I use 11 GR 2, XE of Oracle DB version. I have set up the text with WORLD_LEXER index.

    I have trouble with the contribution of the CONTAINS, when it contains (invalid) query operators.
    If I make a mistake in the request, for example "Hello & | Hi', the server will crash because Oracle will not be able to parse the query.
    What is the recommended way (SQL injection-raincoats and not analyzable entry handles) to generate the query for the procedure CONTAINS?

    I used curly braces so far, but those who escape the query operators. Note that I have no problem escaping from the entire query, if it is not valid, but how would I go about detecting that?

    Ah, good question. Not envisioned this scenario.

    The name of the index is only used to extract join (PRINTJOINS) characters and empty words. If you use the same characters to join (or none) and stopword list for each index, then just call it once, the returned string works perfectly for both indexes.

    If not, then you will need to call the function parser outside the query, something like:

    search1 varchar2(4000);
    search2 varchar2(4000);
    
    parser.setIndex( 'myindex1' );
    search1 := parser.simpleSearch( input );
    parser.setIndex( 'myindex2' );
    search2 := parser.simpleSearch( input );
    
    select score(1), ...
      where contains( dummy1, search1, 1 ) > 0
    UNION ALL
    select score(2), ...
      where contains( dummy2, search2, 2 ) > 0
    

    Otherwise, you could change my code so that the index name is passed as a parameter to each call. That's how I originally had it, but then I moved it to a separate call to make it more orderly.

    Published by: Roger Ford on February 22, 2013 04:25

Maybe you are looking for