Index for group by

Oracle 10g:
Does having index help when doing query by "group by"?
For eg: select aa, count(*) from B group by aa

ErickG wrote:
Hello,
as yo used count(*) a full table scan will be performed. If you use a col1 that was indexed,
like col1 for a count, not group by, an index scan will be performed, but be carefull if there
is no null in table col1, the amount will be incorrect.
RegardsSo I didn't understand that null col will destroy the count. Also why wouldn't having index help when doing group by?

Similar Messages

  • Indexes for group by query on table with 5million records

    Hi,
    Here is my query which is taking ages to run :
         SELECT approved.budgetReferenceno
                   , approved.projects
                   , approved.allocations
                   , rptgen4
                         , financialyear
                   , cashclass
                   , SUM(nvl(approved.FullYear,0)) as FullYear
              FROM   approved
              JOIN   rpt_entity ON rpt_entity.level0 = approved.entity
              JOIN   cashclasses     ON accountcode    = approved.account
        where budgetreferenceno = refno    
        and
            entity in ( 
               (select Level0 from rpt_entity   where   
               (   entityparent in (select * from table(split(userid)))    or   rptgen5 in (select * from table(split(userid)))   )   ) 
         and
           ccs in (select level0 from rpt_ccs where rptgen4 in (select * from table(split(userid)))) or
           ccs in (select level0 from rpt_ccs where rptgen5 in (select * from table(split(userid)))) or
           ccs in (select level0 from rpt_ccs where rptgen6 in (select * from table(split(userid)))) or
           ccs in (select level0 from rpt_ccs where rptgen7 in (select * from table(split(userid))) ) or
           ccs in (select distinct(substr(column_value,2,length(column_value)-2)) from table(split_comma(userid)) )
              GROUP BY approved.budgetReferenceno
                   , approved.projects
                   , approved.allocations
                   , rptgen4
                         , financialyear
                   , cashclass
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 4074481161
    | Id  | Operation                                | Name            | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                         |                 | 31234 |  3660K|       | 86141   (1)| 00:17:14 |
    |   1 |  HASH GROUP BY                           |                 | 31234 |  3660K|    17M| 86141   (1)| 00:17:14 |
    |*  2 |   FILTER                                 |                 |       |       |       |            |          |
    |*  3 |    HASH JOIN                             |                 |   138K|    15M|       | 82427   (1)| 00:16:30 |
    |   4 |     TABLE ACCESS FULL                    | CASHCLASSES     |  2875 | 48875 |       |     5   (0)| 00:00:01 |
    |*  5 |     HASH JOIN                            |                 |   138K|    13M|       | 82420   (1)| 00:16:30 |
    PLAN_TABLE_OUTPUT
    |   6 |      TABLE ACCESS FULL                   | RPT_entity  |   725 | 10875 |       |    11   (0)| 00:00:01 |
    |*  7 |      HASH JOIN RIGHT SEMI                |                 |   138K|    11M|       | 82408   (1)| 00:16:29 |
    |   8 |       VIEW                               | VW_NSO_1        |    71 |   568 |       |    11   (0)| 00:00:01 |
    |*  9 |        FILTER                            |                 |       |       |       |            |          |
    |  10 |         TABLE ACCESS FULL                | RPT_entity  |   725 | 17400 |       |    11   (0)| 00:00:01 |
    |* 11 |         COLLECTION ITERATOR PICKLER FETCH| SPLIT           |       |       |       |            |          |
    |* 12 |         COLLECTION ITERATOR PICKLER FETCH| SPLIT           |       |       |       |            |          |
    |* 13 |       TABLE ACCESS FULL                  | approved        |  1170K|    89M|       | 82389   (1)| 00:16:29 |
    |  14 |    NESTED LOOPS                          |                 |     1 |    18 |       |    46   (0)| 00:00:01 |
    |  15 |     COLLECTION ITERATOR PICKLER FETCH    | SPLIT           |       |       |       |            |          |
    |* 16 |     INDEX RANGE SCAN                     | CC_INDEX1       |     1 |    16 |       |     1   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    |  17 |    NESTED LOOPS                          |                 |     2 |    46 |       |    51   (2)| 00:00:01 |
    |* 18 |     INDEX FAST FULL SCAN                 | CC_INDEX2       |     1 |    21 |       |    46   (3)| 00:00:01 |
    |* 19 |     COLLECTION ITERATOR PICKLER FETCH    | SPLIT           |       |       |       |            |          |
    |  20 |    NESTED LOOPS                          |                 |     1 |    24 |       |    52   (0)| 00:00:01 |
    |  21 |     TABLE ACCESS BY INDEX ROWID          | RPT_ccs |     1 |    22 |       |    46   (0)| 00:00:01 |
    |* 22 |      INDEX SKIP SCAN                     | CC_INDEX1       |     1 |       |       |    45   (0)| 00:00:01 |
    |* 23 |     COLLECTION ITERATOR PICKLER FETCH    | SPLIT           |       |       |       |            |          |
    |  24 |    NESTED LOOPS                          |                 |     2 |    50 |       |    60   (0)| 00:00:01 |
    |  25 |     TABLE ACCESS BY INDEX ROWID          | RPT_ccs |     1 |    23 |       |    46   (0)| 00:00:01 |
    |* 26 |      INDEX SKIP SCAN                     | CC_INDEX1       |     1 |       |       |    45   (0)| 00:00:01 |
    |* 27 |     COLLECTION ITERATOR PICKLER FETCH    | SPLIT           |       |       |       |            |          |
    PLAN_TABLE_OUTPUT
    |* 28 |    COLLECTION ITERATOR PICKLER FETCH     | SPLIT_COMMA     |       |       |       |            |          |
    Predicate Information (identified by operation id):
       2 - filter( EXISTS (SELECT 0 FROM "RPT_ccs" "RPT_ccs",TABLE() "KOKBF$" WHERE
                  "LEVEL0"=:B1 AND "RPTGEN4"=VALUE(KOKBF$)) OR  EXISTS (SELECT 0 FROM "RPT_ccs"
                  "RPT_ccs",TABLE() "KOKBF$" WHERE "RPTGEN5"=VALUE(KOKBF$) AND "LEVEL0"=:B2) OR  EXISTS (SELECT 0
                  FROM "RPT_ccs" "RPT_ccs",TABLE() "KOKBF$" WHERE "RPTGEN6"=VALUE(KOKBF$) AND "LEVEL0"=:B3)
                  OR  EXISTS (SELECT 0 FROM "RPT_ccs" "RPT_ccs",TABLE() "KOKBF$" WHERE
    PLAN_TABLE_OUTPUT
                  "RPTGEN7"=VALUE(KOKBF$) AND "LEVEL0"=:B4) OR  EXISTS (SELECT 0 FROM TABLE() "KOKBF$" WHERE
                  SUBSTR(VALUE(KOKBF$),2,LENGTH(VALUE(KOKBF$))-2)=:B5))
       3 - access("ACCOUNTCODE"="approved"."ACCOUNT")
       5 - access("RPT_entity"."LEVEL0"="approved"."entity")
       7 - access("approved"."entity"="LEVEL0")
       9 - filter( EXISTS (SELECT 0 FROM TABLE() "KOKBF$" WHERE VALUE(KOKBF$)=:B1) OR  EXISTS (SELECT 0 FROM
                  TABLE() "KOKBF$" WHERE VALUE(KOKBF$)=:B2))
      11 - filter(VALUE(KOKBF$)=:B1)
      12 - filter(VALUE(KOKBF$)=:B1)
      13 - filter("approved"."BUDGETREFERENCENO"='BASE')
      16 - access("RPTGEN4"=VALUE(KOKBF$) AND "LEVEL0"=:B1)
    PLAN_TABLE_OUTPUT
      18 - filter("LEVEL0"=:B1)
      19 - filter("RPTGEN5"=VALUE(KOKBF$))
      22 - access("LEVEL0"=:B1)
           filter("LEVEL0"=:B1)
      23 - filter("RPTGEN6"=VALUE(KOKBF$))
      26 - access("LEVEL0"=:B1)
           filter("LEVEL0"=:B1)
      27 - filter("RPTGEN7"=VALUE(KOKBF$))
      28 - filter(SUBSTR(VALUE(KOKBF$),2,LENGTH(VALUE(KOKBF$))-2)=:B1)
    64 rows selected.
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE    11.1.0.7.0      Production
    TNS for IBM/AIX RISC System/6000: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - ProductionThe table has 28 columns none indexed the columns mentioned here have non unique values.
    The table approved has more than 10million records and the query is taking a huge time.
    The query first tries to restrict the search to only valid entities and cc (already indexed and working fine).
    The cardinality of allocations, projects is around 1000, entity is 3000, and cc is around 50,000, reference number = 2000, financialyear = 4
    Please suggest which index would be best to use on these columns given that there will no updations but frequent insertions.
    If nothing else works than I will need to change it to pre aggregated data for overnight run .
    Thanks,
    Neetesh
    Edited by: user13312817 on Nov 16, 2011 11:05 AM
    Edited by: user13312817 on Nov 16, 2011 11:36 AM
    Edited by: user13312817 on Nov 16, 2011 11:38 AM
    Edited by: user13312817 on Nov 16, 2011 12:02 PM

    Hello Adam,
    Tried this but still not much of a difference.
    create index test_index on approved (budgetreferenceno,projects,allocations,financialyear,entity,ccs,FullYear) compress 6;
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 2463060356
    | Id  | Operation                               | Name            | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                        |                 | 25030 |  4644K|       | 70852   (1)| 00:14:11 |
    |   1 |  TABLE ACCESS BY INDEX ROWID            | FEGEN4          |     1 |    13 |       |     2   (0)| 00:00:01 |
    |*  2 |   INDEX UNIQUE SCAN                     | INDEX1          |     1 |       |       |     1   (0)| 00:00:01 |
    |   3 |  TABLE ACCESS BY INDEX ROWID            | CASHCLASSES     |     1 |    17 |       |     2   (0)| 00:00:01 |
    |*  4 |   INDEX UNIQUE SCAN                     | CASHCLASSES_PK  |     1 |       |       |     1   (0)| 00:00:01 |
    |   5 |  HASH GROUP BY                          |                 | 25030 |  4644K|    21M| 70852   (1)| 00:14:11 |
    PLAN_TABLE_OUTPUT
    |   6 |   VIEW                                  |                 |   109K|    19M|       | 68578   (1)| 00:13:43 |
    |*  7 |    FILTER                               |                 |       |       |       |            |          |
    |*  8 |     HASH JOIN RIGHT SEMI                |                 |   484K|    99M|       | 68578   (1)| 00:13:43 |
    |   9 |      VIEW                               | VW_NSO_1        |    71 |  7242 |       |    11   (0)| 00:00:01 |
    |* 10 |       FILTER                            |                 |       |       |       |            |          |
    |  11 |        TABLE ACCESS FULL                | RPT_entity  |   725 | 17400 |       |    11   (0)| 00:00:01 |
    |* 12 |        COLLECTION ITERATOR PICKLER FETCH| SPLIT           |       |       |       |            |          |
    |* 13 |        COLLECTION ITERATOR PICKLER FETCH| SPLIT           |       |       |       |            |          |
    |* 14 |      TABLE ACCESS FULL                  | approved         |   982K|   106M|       | 68560   (1)| 00:13:43 |
    |  15 |     NESTED LOOPS                        |                 |     1 |    18 |       |    46   (0)| 00:00:01 |
    |  16 |      COLLECTION ITERATOR PICKLER FETCH  | SPLIT           |       |       |       |            |          |
    PLAN_TABLE_OUTPUT
    |* 17 |      INDEX RANGE SCAN                   | CC_INDEX1       |     1 |    16 |       |     1   (0)| 00:00:01 |
    |  18 |     NESTED LOOPS                        |                 |     2 |    46 |       |    51   (2)| 00:00:01 |
    |* 19 |      INDEX FAST FULL SCAN               | CC_INDEX2       |     1 |    21 |       |    46   (3)| 00:00:01 |
    |* 20 |      COLLECTION ITERATOR PICKLER FETCH  | SPLIT           |       |       |       |            |          |
    |  21 |     NESTED LOOPS                        |                 |     1 |    24 |       |    52   (0)| 00:00:01 |
    |  22 |      TABLE ACCESS BY INDEX ROWID        | RPT_ccs |     1 |    22 |       |    46   (0)| 00:00:01 |
    |* 23 |       INDEX SKIP SCAN                   | CC_INDEX1       |     1 |       |       |    45   (0)| 00:00:01 |
    |* 24 |      COLLECTION ITERATOR PICKLER FETCH  | SPLIT           |       |       |       |            |          |
    |  25 |     NESTED LOOPS                        |                 |     2 |    50 |       |    60   (0)| 00:00:01 |
    |  26 |      TABLE ACCESS BY INDEX ROWID        | RPT_ccs |     1 |    23 |       |    46   (0)| 00:00:01 |
    |* 27 |       INDEX SKIP SCAN                   | CC_INDEX1       |     1 |       |       |    45   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    |* 28 |      COLLECTION ITERATOR PICKLER FETCH  | SPLIT           |       |       |       |            |          |
    |* 29 |     COLLECTION ITERATOR PICKLER FETCH   | SPLIT_COMMA     |       |       |       |            |          |
    Predicate Information (identified by operation id):
       2 - access("LEVEL0"=:B1)
       4 - access("ACCOUNTCODE"=:B1)
       7 - filter( EXISTS (SELECT 0 FROM "RPT_ccs" "RPT_ccs",TABLE() "KOKBF$" WHERE
                  "LEVEL0"=:B1 AND "RPTGEN4"=VALUE(KOKBF$)) OR  EXISTS (SELECT 0 FROM "RPT_ccs"
    PLAN_TABLE_OUTPUT
                  "RPT_ccs",TABLE() "KOKBF$" WHERE "RPTGEN5"=VALUE(KOKBF$) AND "LEVEL0"=:B2) OR  EXISTS (SELECT 0
                  FROM "RPT_ccs" "RPT_ccs",TABLE() "KOKBF$" WHERE "RPTGEN6"=VALUE(KOKBF$) AND "LEVEL0"=:B3)
                  OR  EXISTS (SELECT 0 FROM "RPT_ccs" "RPT_ccs",TABLE() "KOKBF$" WHERE
                  "RPTGEN7"=VALUE(KOKBF$) AND "LEVEL0"=:B4) OR  EXISTS (SELECT 0 FROM TABLE() "KOKBF$" WHERE
                  SUBSTR(VALUE(KOKBF$),2,LENGTH(VALUE(KOKBF$))-2)=:B5))
       8 - access("entity"="LEVEL0")
      10 - filter( EXISTS (SELECT 0 FROM TABLE() "KOKBF$" WHERE VALUE(KOKBF$)=:B1) OR  EXISTS (SELECT 0 FROM
                  TABLE() "KOKBF$" WHERE VALUE(KOKBF$)=:B2))
      12 - filter(VALUE(KOKBF$)=:B1)
      13 - filter(VALUE(KOKBF$)=:B1)
      14 - filter("BUDGETREFERENCENO"='BASE')
    PLAN_TABLE_OUTPUT
      17 - access("RPTGEN4"=VALUE(KOKBF$) AND "LEVEL0"=:B1)
      19 - filter("LEVEL0"=:B1)
      20 - filter("RPTGEN5"=VALUE(KOKBF$))
      23 - access("LEVEL0"=:B1)
           filter("LEVEL0"=:B1)
      24 - filter("RPTGEN6"=VALUE(KOKBF$))
      27 - access("LEVEL0"=:B1)
           filter("LEVEL0"=:B1)
      28 - filter("RPTGEN7"=VALUE(KOKBF$))
      29 - filter(SUBSTR(VALUE(KOKBF$),2,LENGTH(VALUE(KOKBF$))-2)=:B1)
    PLAN_TABLE_OUTPUT
    Note
       - dynamic sampling used for this statement
    69 rows selected.Thanks,
    Neetesh
    Edited by: user13312817 on Nov 17, 2011 7:04 AM

  • Index for "group by" statement.

    Hi,
    I have a statement directed at the GLPCP table.
    It sums op the plan number in each month.
    In ABAP it looks like this
    SELECT ryear rprctr racct kostl ps_psp_pnr rfarea
             SUM( hsl01 ) SUM( hsl02 ) SUM( hsl03 )
             SUM( hsl04 ) SUM( hsl05 ) SUM( hsl06 )
             SUM( hsl07 ) SUM( hsl08 ) SUM( hsl09 )
             SUM( hsl10 ) SUM( hsl11 ) SUM( hsl12 )
             INTO TABLE e_t_data
             FROM glpcp
             WHERE kokrs   EQ '0020'
             AND   ryear   IN l_r_year
             AND   rldnr   EQ '8A'
             AND   rrcty   EQ '1'
             AND   rvers   EQ '010'
             AND   rbukrs  EQ '0020'
             GROUP BY ryear rprctr racct kostl ps_psp_pnr rfarea.
    I have created an index on KOKRS, RYEAR, RLDNR, RRCTY, RVERS, RBUKRS. To support the where statement.
    This speeds up the process some but i believe that greater performance can be achieved.
    I ran the expression through the SQL explain routine.
    The path looks like this http://yfrog.com/jdexplainpathj
    It came out with poor performance regarding the group by sentence.
    Explanation of query block number: 1   step: 2
    Query block type is SELECT
    Performance appears to be bad
    Method:
    .          additional sorts needed
    .          for the composite table (current result table)
    .          the sorts are performed
    .          - to meet an GROUP BY
    .          unknown or no prefetch is used
    How can i build an index to support the group by sentence.
    Best Regards
    - Rasmus

    Hi Hermann,
    I can see why you are confused. It is hard to keep track with the changes.
    I will sum up:
    The abap statement.
    SELECT ryear rprctr racct kostl ps_psp_pnr
             SUM( hsl01 ) SUM( hsl02 ) SUM( hsl03 )
             SUM( hsl04 ) SUM( hsl05 ) SUM( hsl06 )
             SUM( hsl07 ) SUM( hsl08 ) SUM( hsl09 )
             SUM( hsl10 ) SUM( hsl11 ) SUM( hsl12 )
             INTO TABLE it_glpcp
             FROM glpcp
             WHERE kokrs   EQ '0020'
             AND   ryear   IN l_r_year
             AND   rldnr   EQ '8A'
             AND   rrcty   EQ '1'
             AND   rvers   EQ '010'
             AND   rbukrs  EQ '0020'
             GROUP BY rprctr racct kostl ps_psp_pnr ryear.
    The SQL statement mad from the abap:
    SELECT                                                                               
    "RYEAR" , "RPRCTR" , "RACCT" , "KOSTL" , "PS_PSP_PNR" ,"RFAREA" , SUM( "HSL01" ) , SUM( "HSL02" ) ,   
      SUM( "HSL03" ) , SUM("HSL04" ) , SUM( "HSL05" ) , SUM( "HSL06" ) , SUM( "HSL07" ) , SUM("HSL08" ) ,   
      SUM( "HSL09" ) , SUM( "HSL10" ) , SUM( "HSL11" ) , SUM("HSL12" )                                      
    FROM                                                                               
    "GLPCP"                                                                               
    WHERE                                                                               
    "RCLNT" = ? AND "KOKRS" = ? AND "RYEAR" =? AND "RLDNR" = ? AND "RRCTY" = ? AND "RVERS" = ? AND "RBUKRS"
      = ?GROUP BY "RYEAR" , "RPRCTR" , "RACCT" , "KOSTL" , "PS_PSP_PNR" ,"RFAREA" FOR FETCH ONLY WITH UR
    The index no. 9.
    http://yfrog.com/jbidx9j
    The hierarchial access path:
    http://yfrog.com/1qexplainj
    This is where I stand at the moment.
    Best Regards,
    Rasmus
    Edited by: Rasmus Stokholm on Apr 7, 2010 1:13 PM

  • Errors in the OLAP storage engine: An error occurred while processing the indexes for the partition of the measure group of the cube from the database.

    Errors in the OLAP storage engine: An error occurred while processing the indexes for the partition of the measure group of the cube from the database.
    I have dropped and recreated a fact table to refresh the data as the table is having identity columns. So not able to directly insert data. After that cube is throwing above error.
    Please suggest.

    Hi Md,
    It hard to analyse the issue base on the limited information, Are there any error message on the log? Under C:\Program Files\Microsoft SQL Server\MSAS11.\OLAP\Log (this could be different for your server), there are 3 log files that are generated:
    msmdrrv.log
    FlightRecorderCurrent.trc
    FightRecorderBack.trc
    The msmdrrv.log simply points to the other two logs. There might be some detail information for this error. Please provide us the detail information about it, so that we can make further analysis.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Index File group on same drive as data files

    I've just found a file group used for indexes on the same drive as the data files.
    Am i correct in saying there is little benefit to this. The index file group should be on it's own spindle?
    Mr Shaw... One day I might know a thing or two about SQL Server!

    Definitely there will be performance gain provided you are querying for related data which as references index on those index filegroups.
    It helps in parallel processing , having data and index on multiple disk heads helps in reading the data parallel. For more information you can refer the below link
    https://technet.microsoft.com/en-us/library/ms190433%28v=sql.105%29.aspx
    --Prashanth

  • More than one index for a column.

    Hi,
    I am trying to create more than one index for a particular column of the table.But oracle does not allow more than one index for a column.
    I just want to make sure whether we can add more than one index for a column
    and if yes what are the scenarios.
    Because as far as i know some database allows more than one index for a single column.

    You cannot create more than one index for the same column(s).This is not so true Nicolas. Look at following example:
    SQL> create index idx_mytest_id on mytest(id);
    Index created.
    SQL> create index idx_mytest_id_desc on mytest(id desc);
    Index created.
    SQL> create index idx_fbi_mytest_id_upper on mytest(upper(id));
    Index created.
    SQL> create index idx_fbi_mytest_id_upper_desc on mytest(upper(id) desc);
    Index created.
    SQL> create index idx_fbi_mytest_id_lower_id on mytest(lower(id));
    Index created.
    SQL> create index idx_fbi_mytest_id_lower_id_dsc on mytest(lower(id) desc);
    Index created.
    SQL> create index idx_fbi_mytest_id_tr_up on mytest(trunc(upper(id)));
    Index created.
    -- I can still continue but for this example this will be enough
    SQL> select index_name from dba_indexes where table_name = 'MYTEST';
    INDEX_NAME                                                                                                    
    IDX_MYTEST_ID                                                                                                 
    IDX_FBI_MYTEST_ID_UPPER                                                                                       
    IDX_MYTEST_ID_DESC                                                                                            
    IDX_FBI_MYTEST_ID_UPPER_DESC                                                                                  
    IDX_FBI_MYTEST_ID_LOWER_ID                                                                                    
    IDX_FBI_MYTEST_ID_LOWER_ID_DSC                                                                                
    IDX_FBI_MYTEST_ID_TR_UP                                                                                       
    7 rows selected.You can see 7 indexes for one column (ID) and I could still continue...
    So according this test we can say you can't create more than one index for one column (or the same group of columns in case of composite index) with same condition(s).
    Message was edited by:
    Ivan Kartik
    Or simplified: you can't create the same index for same column(s) twice :-)

  • Creating index for a big table

    Hello,
    We have Oracle 9.2
    I have two tables TableA and TableB. TableB is created by copying part of the content of TableA. Inorder to speed up the coping process, I dropped the primary index of TableB. Now TableB has 94 million records.
    Now I was trying to create the primary index for TableB with the following script:
    CREATE UNIQUE INDEX USR3."TableB~0"
    ON USR3.TableB(ID,COUNTER)
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    TABLESPACE INDEX1
    STORAGE(FREELISTS 1
    FREELIST GROUPS 1
    BUFFER_POOL DEFAULT)
    LOGGING
    NOPARALLEL
    NOCOMPRESS
    And I get the Oracle catch all error (ora-00600: internal error....)
    And I only have the following error message: "kcbvmap: unable to find victim buffer"
    The tablespace is a locally managed tablespace
    Please help, how do I fix this problem.

    CREATE UNIQUE INDEX USR3."TableB~0"
    What's with the wacky name?

  • Why is the Star Transformation using two indexes for the same dimension?

    Hi,
    Recently, I have made an investigation about the Star Transformation feature. I have found a strange test case, which plays an important role in my strategy for our overall DWH architecture. Here it is:
    The Strategy:
    I would like to have the classical Star Transformation approach (single column Bitmap Indexes for each dimension foreign key column in the fact table), together with additional Bitmap Join Indexes for some of the dimension attributes, which would benefit from the materialization of the join (bitmap merge operation will be skipped/optimized).
    The query:
    select dp.brand, ds. region_name, dc.region_name
         , count(*), sum(f.extended_price)
      from fact_line_item  f
         , dim_part       dp
         , dim_supplier   ds
         , dim_customer   dc
    where dp.mfgr        = 10                 -- dimension selectivity = 1/10 --> acttual/fact selectivity = 6/10
       and f.part_dk      = dp.dk
       and ds.region_name = 'REGION #1' -- dimension selectivity = 1/9
       and f.supplier_dk  = ds.dk
       and dc.region_name = 'REGION #1' -- dimension selectivity = 1/11
       and f.customer_dk  = dc.dk
    group by dp.brand, ds. region_name, dc.region_name
    The actual plan:
    | Id  | Operation                              | Name                        | Starts | E-Rows | Cost (%CPU)| A-Rows |   A-Time   | Buffers | Reads  |
    |   0 | SELECT STATEMENT                       |                             |      1 |        |  3247 (100)|      1 |00:01:42.05 |     264K|    220K|
    |   1 |  HASH GROUP BY                         |                             |      1 |      2 |  3247   (1)|      1 |00:01:42.05 |     264K|    220K|
    |*  2 |   HASH JOIN                            |                             |      1 |  33242 |  3037   (1)|    217K|00:01:29.67 |     264K|    220K|
    |*  3 |    TABLE ACCESS FULL                   | DIM_SUPPLIER                |      1 |   1112 |   102   (0)|   1112 |00:00:00.01 |     316 |      4 |
    |*  4 |    HASH JOIN                           |                             |      1 |  33245 |  2934   (1)|    217K|00:01:29.10 |     264K|    220K|
    |*  5 |     TABLE ACCESS FULL                  | DIM_CUSTOMER                |      1 |    910 |   102   (0)|    910 |00:00:00.08 |     316 |      8 |
    |*  6 |     HASH JOIN                          |                             |      1 |  33248 |  2831   (1)|    217K|00:01:28.57 |     264K|    220K|
    |*  7 |      TABLE ACCESS FULL                 | DIM_PART                    |      1 |     10 |     3   (0)|     10 |00:00:00.01 |       6 |      0 |
    |   8 |      PARTITION RANGE ALL               |                             |      1 |  36211 |  2827   (1)|    217K|00:01:28.01 |     264K|    220K|
    |   9 |       TABLE ACCESS BY LOCAL INDEX ROWID| FACT_LINE_ITEM              |      6 |  36211 |  2827   (1)|    217K|00:01:33.85 |     264K|    220K|
    |  10 |        BITMAP CONVERSION TO ROWIDS     |                             |      6 |        |            |    217K|00:00:07.09 |   46980 |   3292 |
    |  11 |         BITMAP AND                     |                             |      6 |        |            |     69 |00:00:08.33 |   46980 |   3292 |
    |  12 |          BITMAP MERGE                  |                             |      6 |        |            |    193 |00:00:02.09 |    2408 |   1795 |
    |  13 |           BITMAP KEY ITERATION         |                             |      6 |        |            |   4330 |00:00:04.66 |    2408 |   1795 |
    |  14 |            BUFFER SORT                 |                             |      6 |        |            |     60 |00:00:00.01 |       6 |      0 |
    |* 15 |             TABLE ACCESS FULL          | DIM_PART                    |      1 |     10 |     3   (0)|     10 |00:00:00.01 |       6 |      0 |
    |* 16 |            BITMAP INDEX RANGE SCAN     | FACT_LI__P_PART_DIM_KEY_BIX |     60 |        |            |   4330 |00:00:02.11 |    2402 |   1795 |
    |* 17 |          BITMAP INDEX SINGLE VALUE     | FACT_LI__P_PART_MFGR_BJX    |      6 |        |            |   1747 |00:00:06.65 |     890 |    888 |
    |  18 |          BITMAP MERGE                  |                             |      6 |        |            |    169 |00:00:02.78 |   16695 |    237 |
    |  19 |           BITMAP KEY ITERATION         |                             |      6 |        |            |   5460 |00:00:01.56 |   16695 |    237 |
    |  20 |            BUFFER SORT                 |                             |      6 |        |            |   5460 |00:00:00.02 |     316 |      0 |
    |* 21 |             TABLE ACCESS FULL          | DIM_CUSTOMER                |      1 |    910 |   102   (0)|    910 |00:00:00.01 |     316 |      0 |
    |* 22 |            BITMAP INDEX RANGE SCAN     | FACT_LI__P_CUST_DIM_KEY_BIX |   5460 |        |            |   5460 |00:00:02.07 |   16379 |    237 |
    |  23 |          BITMAP MERGE                  |                             |      6 |        |            |    170 |00:00:03.65 |   26987 |    372 |
    |  24 |           BITMAP KEY ITERATION         |                             |      6 |        |            |   6672 |00:00:02.23 |   26987 |    372 |
    |  25 |            BUFFER SORT                 |                             |      6 |        |            |   6672 |00:00:00.01 |     316 |      0 |
    |* 26 |             TABLE ACCESS FULL          | DIM_SUPPLIER                |      1 |   1112 |   102   (0)|   1112 |00:00:00.01 |     316 |      0 |
    |* 27 |            BITMAP INDEX RANGE SCAN     | FACT_LI__S_SUPP_DIM_KEY_BIX |   6672 |        |            |   6672 |00:00:02.74 |   26671 |    372 |
    The Question:
    Why is the Star Transformation using both indexes FACT_LI__P_PART_DIM_KEY_BIX and FACT_LI__P_PART_MFGR_BJX for the same dimension criteria (dp.mfgr = 10)?? The introduction of the additional Bitmap Join Index actually make Oracle to do the work twice !!!
    Anybody, any idea ?!?

    Dom, here it is the plan with the predicates:
    | Id  | Operation                              | Name                        | Starts | E-Rows | Cost (%CPU)| A-Rows |   A-Time   | Buffers | Reads  |
    |   0 | SELECT STATEMENT                       |                             |      1 |        |  3638 (100)|      1 |00:06:41.17 |     445K|    236K|
    |   1 |  HASH GROUP BY                         |                             |      1 |      2 |  3638   (1)|      1 |00:06:41.17 |     445K|    236K|
    |*  2 |   HASH JOIN                            |                             |      1 |  33242 |  3429   (1)|    217K|00:08:18.02 |     445K|    236K|
    |*  3 |    TABLE ACCESS FULL                   | DIM_SUPPLIER                |      1 |   1112 |   102   (0)|   1112 |00:00:00.03 |     319 |    313 |
    |*  4 |    HASH JOIN                           |                             |      1 |  33245 |  3326   (1)|    217K|00:08:17.47 |     445K|    236K|
    |*  5 |     TABLE ACCESS FULL                  | DIM_CUSTOMER                |      1 |    910 |   102   (0)|    910 |00:00:00.01 |     319 |    313 |
    |*  6 |     HASH JOIN                          |                             |      1 |  33248 |  3223   (1)|    217K|00:08:16.63 |     445K|    236K|
    |*  7 |      TABLE ACCESS FULL                 | DIM_PART                    |      1 |     10 |     3   (0)|     10 |00:00:00.01 |       6 |      0 |
    |   8 |      PARTITION RANGE ALL               |                             |      1 |  36211 |  3219   (1)|    217K|00:08:16.30 |     445K|    236K|
    |   9 |       TABLE ACCESS BY LOCAL INDEX ROWID| FACT_LINE_ITEM              |      6 |  36211 |  3219   (1)|    217K|00:08:40.89 |     445K|    236K|
    |  10 |        BITMAP CONVERSION TO ROWIDS     |                             |      6 |        |            |    217K|00:00:32.00 |   46919 |  19331 |
    |  11 |         BITMAP AND                     |                             |      6 |        |            |     69 |00:00:34.50 |   46919 |  19331 |
    |  12 |          BITMAP MERGE                  |                             |      6 |        |            |    193 |00:00:00.58 |    2353 |      1 |
    |  13 |           BITMAP KEY ITERATION         |                             |      6 |        |            |   4330 |00:00:00.10 |    2353 |      1 |
    |  14 |            BUFFER SORT                 |                             |      6 |        |            |     60 |00:00:00.01 |       6 |      0 |
    |* 15 |             TABLE ACCESS FULL          | DIM_PART                    |      1 |     10 |     3   (0)|     10 |00:00:00.01 |       6 |      0 |
    |* 16 |            BITMAP INDEX RANGE SCAN     | FACT_LI__P_PART_DIM_KEY_BIX |     60 |        |            |   4330 |00:00:00.07 |    2347 |      1 |
    |* 17 |          BITMAP INDEX SINGLE VALUE     | FACT_LI__P_PART_MFGR_BJX    |      6 |        |            |   1747 |00:01:23.64 |     882 |    565 |
    |  18 |          BITMAP MERGE                  |                             |      6 |        |            |    169 |00:00:09.14 |   16697 |   7628 |
    |  19 |           BITMAP KEY ITERATION         |                             |      6 |        |            |   5460 |00:00:02.19 |   16697 |   7628 |
    |  20 |            BUFFER SORT                 |                             |      6 |        |            |   5460 |00:00:00.01 |     316 |      0 |
    |* 21 |             TABLE ACCESS FULL          | DIM_CUSTOMER                |      1 |    910 |   102   (0)|    910 |00:00:00.01 |     316 |      0 |
    |* 22 |            BITMAP INDEX RANGE SCAN     | FACT_LI__P_CUST_DIM_KEY_BIX |   5460 |        |            |   5460 |00:00:08.78 |   16381 |   7628 |
    |  23 |          BITMAP MERGE                  |                             |      6 |        |            |    170 |00:00:21.46 |   26987 |  11137 |
    |  24 |           BITMAP KEY ITERATION         |                             |      6 |        |            |   6672 |00:00:10.29 |   26987 |  11137 |
    |  25 |            BUFFER SORT                 |                             |      6 |        |            |   6672 |00:00:00.01 |     316 |      0 |
    |* 26 |             TABLE ACCESS FULL          | DIM_SUPPLIER                |      1 |   1112 |   102   (0)|   1112 |00:00:00.01 |     316 |      0 |
    |* 27 |            BITMAP INDEX RANGE SCAN     | FACT_LI__S_SUPP_DIM_KEY_BIX |   6672 |        |            |   6672 |00:00:20.94 |   26671 |  11137 |
    Predicate Information (identified by operation id):                                                                                                  
       2 - access("F"."SUPPLIER_DK"="DS"."DK")                                                                                                           
       3 - filter("DS"."REGION_NAME"='REGION #1')                                                                                                        
       4 - access("F"."CUSTOMER_DK"="DC"."DK")                                                                                                           
       5 - filter("DC"."REGION_NAME"='REGION #1')                                                                                                        
       6 - access("F"."PART_DK"="DP"."DK")                                                                                                               
       7 - filter("DP"."MFGR"=10)                                                                                                                        
      15 - filter("DP"."MFGR"=10)                                                                                                                        
      16 - access("F"."PART_DK"="DP"."DK")                                                                                                               
      17 - access("F"."SYS_NC00017$"=10)                                                                                                                 
      21 - filter("DC"."REGION_NAME"='REGION #1')                                                                                                        
      22 - access("F"."CUSTOMER_DK"="DC"."DK")                                                                                                           
      26 - filter("DS"."REGION_NAME"='REGION #1')                                                                                                        
      27 - access("F"."SUPPLIER_DK"="DS"."DK")                                                                                                           
    Note                                                                                                                                                 
       - star transformation used for this statement                                                                                                     

  • Text index for UNION queries.

    Hi All,
    Can anyone please help me in tuning search query mentioned below
    select id from usr1.organizations where lower(ID_official_name)   like  'technology%'
    union
    select id from usr1.organizations where lower(ID_OFFICIAL_NORM_NAME)   like  'technology%'
    union
    select id from usr1.organizations where lower(ID_OFFICIAL_ENG_NAME)   like  'technology%'
    union
    select id from usr1.organizations where lower(ID_OFFICIAL_ENG_NORM_NAME)   like  'technology%'
    union
    select id from usr1.organizations where lower(ID_OFFICIAL_TRANS_NAME)   like  'technology%'
    union
    select id from usr1.ID_ALIAS_NAMEs where lower(ID_ALIAS_NAME)   like  'technology%'
    union
    select id from usr1.ID_ALIAS_NAMEs where lower(ID_ALIAS_NORM_NAME)   like  'technology%'
    union
    select id from usr1.ID_ALIAS_NAMEs where lower(ID_ALIAS_ENG_NAME)   like  'technology%'
    union
    select id from usr1.ID_ALIAS_NAMEs where lower(ID_ALIAS_ENG_NORM_NAME)   like  'technology%'
    union
    select id from usr1.ID_ALIAS_NAMEs where lower(ID_ALIAS_TRANS_NAME)   like  'technology%'
    union
    select id from usr1.ID_DOING_BUSINESS_AS_NAMES where lower(ID_dba_name)   like  'technology%'
    union
    select id from usr1.ID_DOING_BUSINESS_AS_NAMES where lower(ID_DBA_NORM_NAME)   like  'technology%'
    union
    select id from usr1.ID_DOING_BUSINESS_AS_NAMES where lower(ID_DBA_ENG_NAME)   like  'technology%'
    union
    select id from usr1.ID_DOING_BUSINESS_AS_NAMES where lower(ID_DBA_ENG_NORM_NAME)   like  'technology%'
    union
    select id from usr1.ID_DOING_BUSINESS_AS_NAMES where lower(ID_DBA_TRANS_NAME)   like  'technology%'
    union
    select id from usr1.ID_FKA_NAMES where lower(ID_fka_name)   like  'technology%'
    union
    select id from usr1.ID_FKA_NAMES where lower(ID_fkA_NORM_NAME)   like  'technology%'
    union
    select id from usr1.ID_FKA_NAMES where lower(ID_fkA_ENG_NAME)   like  'technology%'
    union
    select id from usr1.ID_FKA_NAMES where lower(ID_fkA_ENG_NORM_NAME)   like  'technology%'
    union
    select id from usr1.ID_FKA_NAMES where lower(ID_fkA_TRANS_NAME)   like  'technology%'Here organizations table is the parent table having primary key on id column, and rest all tables are children tables having foreign key on id column referencing to primary key id column in organizations table.
    Planning to implement multiple column(Userdatastore) text index on dummy column appended to organizations table. And write triggers on other child tables to trigger the sync for Text index.
    But not sure whether we can rewrite this above sql query by replacing union into joins, not sure why developer has not done so.
    Can anyone please help me in creating text index for this sql. I do not want to approach cartesian joins as these are having parent-child relationship.
    Oracle Version: 10.2.0.4
    Please let me know if you need more information

    1 .As text index is created in parent table on id column, can we somehow search only from particular columns(Parent or child) by using user_datastore and tags for sectioning it?
    Below are the sql which i need to make use of text index
    select m.id from id_ALIAS_NAMEs an
    join organizations m on(m.id=an.id)
    where lower(ID_ALIAS_NAME)   like  'technology%' and m.id_data_provider<100;
    select M.id,ID_ALIAS_NAME,'ID_ALIAS_NAME' AS NAMETYPE
    from id_alias_names an JOIN organizations m ON m.id=an.id
    where id_data_provider<100 AND coalesce(m.ID_COUNTRY_OF_DOMICILE,m.ID_COUNTRY_OF_INCORPORATION)='US'
    AND LOWER(ID_ALIAS_NAME) like LOWER('TECHNOLOGY%')
    and F_GetFirstWord(ORG_ALIAS_NAME)='TECHNOLOGY'
    The text index must be created on a text column, not a numeric id column. It is common to create it on a dummy column. You can name that column anything you like instead of dummy, like search_columns or some such thing. You can add tags in your procedure, so that your resulting virtual column is like xml data. You can then create a section group, so that you can search within each of those tags. In the example below, I used ctxsys.auto_section_group because it is the simplest to create, but you may get better performance by using another type of section group and naming each individual tag.
    SCOTT@orcl_11gR2> -- tables you already have:
    SCOTT@orcl_11gR2> create table organizations
      2    (id                    number primary key,
      3       id_official_name          varchar2 (10),
      4       id_official_norm_name          varchar2 (10),
      5       id_official_eng_name          varchar2 (10),
      6       id_official_trans_name          varchar2 (10),
      7       id_data_provider          number,
      8       id_country_of_domicile          varchar2 (10),
      9       id_country_of_incorporation  varchar2 (10))
    10  /
    Table created.
    SCOTT@orcl_11gR2> create table id_alias_names
      2    (id                    number references organizations (id),
      3       id_alias_name               varchar2 (10),
      4       id_alias_norm_name          varchar2 (10),
      5       id_alias_eng_name          varchar2 (10),
      6       id_alias_trans_name          varchar2 (10))
      7  /
    Table created.
    SCOTT@orcl_11gR2> create table id_doing_business_as_names
      2    (id                    number references organizations (id),
      3       id_dba_name               varchar2 (10),
      4       id_dba_norm_name          varchar2 (10),
      5       id_dba_eng_name           varchar2 (10),
      6       id_dba_trans_name          varchar2 (10))
      7  /
    Table created.
    SCOTT@orcl_11gR2> create table id_fka_names
      2    (id                    number references organizations (id),
      3       id_fka_name               varchar2 (10),
      4       id_fka_norm_name          varchar2 (10),
      5       id_fka_eng_name           varchar2 (10),
      6       id_fka_trans_name          varchar2 (10))
      7  /
    Table created.
    SCOTT@orcl_11gR2> -- test data:
    SCOTT@orcl_11gR2> insert all
      2  into organizations values (1, 'test', 'name2', 'name3', 'name4', 99, 'US', null)
      3  into organizations values (2, 'name1', 'name2', 'name3', 'name4', 99, null, 'US')
      4  into organizations values (3, 'name1', 'name2', 'name3', 'name4', 99, null, null)
      5  into organizations values (4, 'name1', 'name2', 'name3', 'name4', 101, 'US', 'US')
      6  into organizations values (5, 'technology', 'technology', 'technology', 'technology', 99, 'US', 'US')
      7  select * from dual
      8  /
    5 rows created.
    SCOTT@orcl_11gR2> insert all
      2  into id_alias_names values (1, 'technology', 'name6', 'name7', 'name8')
      3  into id_alias_names values (2, 'technology', 'test', 'name7', 'name8')
      4  into id_alias_names values (3, 'technology', 'name6', 'name7', 'name8')
      5  into id_alias_names values (4, 'technology', 'name6', 'name7', 'name8')
      6  into id_alias_names values (5, 'name5', 'technology', 'technology', 'technology')
      7  select * from dual
      8  /
    5 rows created.
    SCOTT@orcl_11gR2> insert all
      2  into id_doing_business_as_names values (1, 'name9', 'name10', 'name11', 'name12')
      3  into id_doing_business_as_names values (2, 'name9', 'name10', 'name11', 'name12')
      4  into id_doing_business_as_names values (3, 'name9', 'name10', 'test', 'name12')
      5  into id_doing_business_as_names values (4, 'name9', 'name10', 'name11', 'name12')
      6  into id_doing_business_as_names values (5, 'technology', 'technology', 'technology', 'technology')
      7  select * from dual
      8  /
    5 rows created.
    SCOTT@orcl_11gR2> insert all
      2  into id_fka_names values (1, 'name13', 'name14', 'name15', 'name16')
      3  into id_fka_names values (2, 'name13', 'name14', 'name15', 'name16')
      4  into id_fka_names values (3, 'name13', 'name14', 'name15', 'name16')
      5  into id_fka_names values (4, 'name13', 'name14', 'name15', 'test')
      6  into id_fka_names values (5, 'technology', 'technology', 'technology', 'technology')
      7  select * from dual
      8  /
    5 rows created.
    SCOTT@orcl_11gR2> -- revised procedure to join tables with tags:
    SCOTT@orcl_11gR2> create or replace procedure your_proc
      2    (p_rowid in           rowid,
      3       p_clob     in out nocopy clob)
      4  as
      5  begin
      6    for r1 in
      7        (select id,
      8             '<id_official_name>'
      9             || id_official_name
    10             || '</id_official_name><id_official_norm_name>'
    11             || id_official_norm_name
    12             || '</id_official_norm_name><id_official_eng_name>'
    13             || id_official_eng_name
    14             || '</id_official_eng_name><id_official_trans_name>'
    15             || id_official_trans_name
    16             || '</id_official_trans_name>' as tags_and_values
    17         from      organizations
    18         where  rowid = p_rowid)
    19    loop
    20        dbms_lob.writeappend
    21          (p_clob, length (r1.tags_and_values), r1.tags_and_values);
    22        for r2 in
    23          (select '<id_alias_name>'
    24               || id_alias_name
    25               || '</id_alias_name><id_alias_norm_name>'
    26               || id_alias_norm_name
    27               || '</id_alias_norm_name><id_alias_eng_name>'
    28               || id_alias_eng_name
    29               || '</id_alias_eng_name><id_alias_trans_name>'
    30               || id_alias_trans_name
    31               || '</id_alias_trans_name>' as tags_and_values
    32           from   id_alias_names
    33           where  id = r1.id)
    34        loop
    35          dbms_lob.writeappend
    36            (p_clob, length (r2.tags_and_values), r2.tags_and_values);
    37        end loop;
    38        for r3 in
    39          (select '<id_dba_name>'
    40               || id_dba_name
    41               || '</id_dba_name><id_dba_norm_name>'
    42               || id_dba_norm_name
    43               || '</id_dba_norm_name><id_dba_eng_name>'
    44               || id_dba_eng_name
    45               || '</id_dba_eng_name><id_dba_trans_name>'
    46               || id_dba_trans_name
    47               || '</id_dba_trans_name>' as tags_and_values
    48           from   id_doing_business_as_names
    49           where  id = r1.id)
    50        loop
    51          dbms_lob.writeappend
    52            (p_clob, length (r3.tags_and_values), r3.tags_and_values);
    53        end loop;
    54        for r4 in
    55          (select '<id_fka_name>'
    56               || id_fka_name
    57               || '</id_fka_name><id_fka_norm_name>'
    58               || id_fka_norm_name
    59               || '</id_fka_norm_name><id_fka_eng_name>'
    60               || id_fka_eng_name
    61               || '</id_fka_eng_name><id_fka_trans_name>'
    62               || id_fka_trans_name
    63               || '</id_fka_trans_name>' as tags_and_values
    64           from   id_fka_names
    65           where  id = r1.id)
    66        loop
    67          dbms_lob.writeappend
    68            (p_clob, length (r4.tags_and_values), r4.tags_and_values);
    69        end loop;
    70    end loop;
    71  end your_proc;
    72  /
    Procedure created.
    SCOTT@orcl_11gR2> show errors
    No errors.
    SCOTT@orcl_11gR2> -- examples of virtual columns that revised procedure returns:
    SCOTT@orcl_11gR2> declare
      2    v_clob  clob;
      3  begin
      4    for r in
      5        (select rowid, id
      6         from      organizations)
      7    loop
      8        dbms_lob.createtemporary (v_clob, true);
      9        your_proc (r.rowid, v_clob);
    10        dbms_output.put_line (r.id);
    11        dbms_output.put_line (v_clob);
    12        dbms_lob.freetemporary (v_clob);
    13    end loop;
    14  end;
    15  /
    1
    <id_official_name>test</id_official_name><id_official_norm_name>name2</id_official_norm_name><id_official_eng_name>name3
    </id_official_eng_name><id_official_trans_name>name4</id_official_trans_name><id_alias_name>technology</id_alias_name><i
    d_alias_norm_name>name6</id_alias_norm_name><id_alias_eng_name>name7</id_alias_eng_name><id_alias_trans_name>name8</id_a
    lias_trans_name><id_dba_name>name9</id_dba_name><id_dba_norm_name>name10</id_dba_norm_name><id_dba_eng_name>name11</id_d
    ba_eng_name><id_dba_trans_name>name12</id_dba_trans_name><id_fka_name>name13</id_fka_name><id_fka_norm_name>name14</id_f
    ka_norm_name><id_fka_eng_name>name15</id_fka_eng_name><id_fka_trans_name>name16</id_fka_trans_name>
    2
    <id_official_name>name1</id_official_name><id_official_norm_name>name2</id_official_norm_name><id_official_eng_name>name
    3</id_official_eng_name><id_official_trans_name>name4</id_official_trans_name><id_alias_name>technology</id_alias_name><
    id_alias_norm_name>test</id_alias_norm_name><id_alias_eng_name>name7</id_alias_eng_name><id_alias_trans_name>name8</id_a
    lias_trans_name><id_dba_name>name9</id_dba_name><id_dba_norm_name>name10</id_dba_norm_name><id_dba_eng_name>name11</id_d
    ba_eng_name><id_dba_trans_name>name12</id_dba_trans_name><id_fka_name>name13</id_fka_name><id_fka_norm_name>name14</id_f
    ka_norm_name><id_fka_eng_name>name15</id_fka_eng_name><id_fka_trans_name>name16</id_fka_trans_name>
    3
    <id_official_name>name1</id_official_name><id_official_norm_name>name2</id_official_norm_name><id_official_eng_name>name
    3</id_official_eng_name><id_official_trans_name>name4</id_official_trans_name><id_alias_name>technology</id_alias_name><
    id_alias_norm_name>name6</id_alias_norm_name><id_alias_eng_name>name7</id_alias_eng_name><id_alias_trans_name>name8</id_
    alias_trans_name><id_dba_name>name9</id_dba_name><id_dba_norm_name>name10</id_dba_norm_name><id_dba_eng_name>test</id_db
    a_eng_name><id_dba_trans_name>name12</id_dba_trans_name><id_fka_name>name13</id_fka_name><id_fka_norm_name>name14</id_fk
    a_norm_name><id_fka_eng_name>name15</id_fka_eng_name><id_fka_trans_name>name16</id_fka_trans_name>
    4
    <id_official_name>name1</id_official_name><id_official_norm_name>name2</id_official_norm_name><id_official_eng_name>name
    3</id_official_eng_name><id_official_trans_name>name4</id_official_trans_name><id_alias_name>technology</id_alias_name><
    id_alias_norm_name>name6</id_alias_norm_name><id_alias_eng_name>name7</id_alias_eng_name><id_alias_trans_name>name8</id_
    alias_trans_name><id_dba_name>name9</id_dba_name><id_dba_norm_name>name10</id_dba_norm_name><id_dba_eng_name>name11</id_
    dba_eng_name><id_dba_trans_name>name12</id_dba_trans_name><id_fka_name>name13</id_fka_name><id_fka_norm_name>name14</id_
    fka_norm_name><id_fka_eng_name>name15</id_fka_eng_name><id_fka_trans_name>test</id_fka_trans_name>
    5
    <id_official_name>technology</id_official_name><id_official_norm_name>technology</id_official_norm_name><id_official_eng
    _name>technology</id_official_eng_name><id_official_trans_name>technology</id_official_trans_name><id_alias_name>name5</
    id_alias_name><id_alias_norm_name>technology</id_alias_norm_name><id_alias_eng_name>technology</id_alias_eng_name><id_al
    ias_trans_name>technology</id_alias_trans_name><id_dba_name>technology</id_dba_name><id_dba_norm_name>technology</id_dba
    _norm_name><id_dba_eng_name>technology</id_dba_eng_name><id_dba_trans_name>technology</id_dba_trans_name><id_fka_name>te
    chnology</id_fka_name><id_fka_norm_name>technology</id_fka_norm_name><id_fka_eng_name>technology</id_fka_eng_name><id_fk
    a_trans_name>technology</id_fka_trans_name>
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> -- user_datastore:
    SCOTT@orcl_11gR2> begin
      2    ctx_ddl.create_preference ('your_datastore', 'user_datastore');
      3    ctx_ddl.set_attribute ('your_datastore', 'procedure', 'your_proc');
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> -- dummy column:
    SCOTT@orcl_11gR2> alter table organizations add (dummy varchar2(1))
      2  /
    Table altered.
    SCOTT@orcl_11gR2> -- index with auto_section_group,
    SCOTT@orcl_11gR2> -- must be on a text column, like dummy, not numeric id column:
    SCOTT@orcl_11gR2> create index your_index
      2  on organizations (dummy)
      3  indextype is ctxsys.context
      4  parameters
      5    ('datastore     your_datastore
      6        section group     ctxsys.auto_section_group')
      7  /
    Index created.
    SCOTT@orcl_11gR2> -- example queries:
    SCOTT@orcl_11gR2> select id
      2  from   organizations
      3  where  contains (dummy, 'technology within id_alias_name') > 0
      4  and    id_data_provider < 100
      5  /
            ID
             1
             2
             3
    3 rows selected.
    SCOTT@orcl_11gR2> select m.id, an.id_alias_name, 'ID_ALIAS_NAME' as nametype
      2  from   id_alias_names an join organizations m on m.id = an.id
      3  where  contains (m.dummy, 'technology within id_alias_name') > 0
      4  and    m.id_data_provider < 100
      5  and    coalesce (m.id_country_of_domicile, m.id_country_of_incorporation) = 'US'
      6  /
            ID ID_ALIAS_N NAMETYPE
             1 technology ID_ALIAS_NAME
             2 technology ID_ALIAS_NAME
    2 rows selected.
    SCOTT@orcl_11gR2>

  • Configuring Browsing Indexes for Service Search Descriptor Filters

    I am running DSEE 6.1 on Solaris 10.
    I restrict access to the ldap clients (solaris8, 9, and 10) for various users in the Directory by configuring the service search descriptors to use a filter based on specific roles. Each servers profile mentions a role depending on type of server and then users are assigned roles which are nested within specific server type roles:
    NS_LDAP_SERVICE_SEARCH_DESC= passwd:ou=People,dc=example,dc=com?one?nsrole=cn=serverRole,ou=profile,dc=example,dc=com
    NS_LDAP_SERVICE_SEARCH_DESC= group:ou=group,dc=example,dc=com?one
    NS_LDAP_SERVICE_SEARCH_DESC= audit_user:ou=People,dc=example,dc=com?one?nsrole=cn=serverRole,ou=profile,dc=example,dc=com
    NS_LDAP_SERVICE_SEARCH_DESC= shadow:ou=People,dc=example,dc=com?one?nsrole=cn=serverRole,ou=profile,dc=example,dc=com
    NS_LDAP_SERVICE_SEARCH_DESC= user_attr:ou=People,dc=example,dc=com?one?nsrole=cn=serverRole,ou=profile,dc=example,dc=com
    I have noticed in my error logs on the Directory servers messages regarding these filters not being indexed:
    WARNING<20805> - Backend Database - conn=949139 op=1 msgId=2 - search is not indexed base='ou=people,dc=example,dc=com' filter='(nsRole=cn=serverRole,ou=profile,dc=example,dc=com)' scope='one'
    I have also had a few instances where the naming services seems to have stopped altogether. This seems to be timed with when my clients do a refresh of the ldap cache - which is the time that I seed the not indexed messages in the error log.
    I guess that I need to set up Browsing Indexes for these filters
    Can anyone give examples how to do this?
    I guess I will need a vlvBase of ou=people,dc=example,dc=com
    vlvScope of 1
    vlvFilter of nsRole=cn=serverRole,ou=profile,dc=example,dc=com
    I am not sure what I would do for vlvsort attributes though??

    The access logs shows that the attributes to be sorted are uid and cn:
    25/Apr/2008:09:58:21 +1200] conn=171835 op=1 msgId=2 - SRCH base="ou=people,dc=example,dc=com" scope=1 filter="(nsRole=cn=serverRole,ou=profile,dc=example,dc=com)" attrs="cn uid uidNumber gidNumber gecos description homeDirectory loginShell"
    [25/Apr/2008:09:58:21 +1200] conn=171835 op=1 msgId=2 - SORT cn uid (1426)
    [25/Apr/2008:09:58:21 +1200] conn=171835 op=1 msgId=2 - VLV 0:999:0:0 1:1426 (0)
    [25/Apr/2008:09:58:26 +1200] conn=171835 op=1 msgId=2 - RESULT err=0 tag=101 nentries=999 etime=5 notes=U
    So the vlvsort attributes should be cn and uid.

  • ESH_ADM_INDEX_ALL_SC cannot perform initial indexing for all search connectors

    Dear SAP Gurus,
    We are implementing TREX version 7.10.50 for Talent Management ECC 6.0 - EHP 5.
    I'd like to ask you question regarding ESH_ADM_INDEX_ALL_SC program
    which used to create search connector for TREX and perform initial indexing for all search connectors.
    As we know we can perform indexing using  ESH_COCKPIT transaction code or use ESH_ADM_INDEX_ALL_SC.
    If I try to perform indexing using ESH_COCKPIT, all search connectors can be indexed ("searchable" column are "checked" and status are changed to "Active" for all search connectors).
    However, if I try to perform indexing using ESH_ADM_INDEX_ALL_SC, not all search connectors are indexed.
    I've traced the program ESH_ADM_INDEX_ALL_SC using ST01 transaction code and found these error:
    - rscpe__error 32 at rscpu86r.c(6;742) "dest buffer overflow" (,)
    - rscpe__error 32 at rscpc   (20;12129) "convert output buffer overflow"
    - rscpe__error 128 at rstss01 (1;178) "Object not found"
    Please kindly help me to solve this issue,
    Thank you very much
    Regards,
    Bobbi

    Hi Luke,
    Please find below connectors and the status after running ESH_ADM_INDEX_ALL_SC:
    HRTMC AES Documents Prepared
    HRTMC AES Elements Prepared
    HRTMC AES Templates Prepared
    HRTMC Central Person Prepared
    HRTMC Functional Area Prepared
    HRTMC Job Prepared
    HRTMC Job Family Prepared
    HRTMC Org Unit Prepared
    HRTMC Person Active
    HRTMC Position Prepared
    HRTMC Qualification Active
    HRTMC Relation C JF 450 Active
    HRTMC Relation C Q 031 Active
    HRTMC Relation CP JF 744 Active
    HRTMC Relation CP P 209 Active
    HRTMC Relation CP Q 032 Active
    HRTMC Relation CP TB 743 Active
    HRTMC Relation FN Q 031 Active
    HRTMC Relation JF FN 450 Active
    HRTMC Relation JF Q 031 Active
    HRTMC Relation P Q 032 Active
    HRTMC Relation S C 007 Active
    HRTMC Relation S CP 740 Active
    HRTMC Relation S JF 450 Active
    HRTMC Relation S O 003 Active
    HRTMC Relation S O Area of Responsibility Active
    HRTMC Relation S P 008 Active
    HRTMC Relation S Q 031 Active
    HRTMC Relation S S Manager Active
    HRTMC Relation SC JF FN Active
    HRTMC Structural authority Active
    HRTMC Talent Group Prepared
    As suggested by OSS, we implement SAP Note 1058533.
    Kindly need your help.
    Thank you very much
    Regards
    Bobbi

  • [svn] 4283: PARB Review changes for Group and DataGroup.

    Revision: 4283
    Author: [email protected]
    Date: 2008-12-10 14:34:18 -0800 (Wed, 10 Dec 2008)
    Log Message:
    PARB Review changes for Group and DataGroup. The main API changes are:
    - content property on Group and FxContainer renamed to mxmlContent.
    - contentFactory property on FxContainer renamed to mxmlContentFactory
    - New names for DataGroup methods: getRendererForItemAt(index:int):IVisualElement and getItemIndexForRenderer(renderer:IVisualElement):int. These are now in the mxml_internal namespace (not public anymore)
    - registerRenderer and unregisterRenderer are private methods (not public)
    Also, I made a minor fix to ITransformable.
    QE Notes: Steve's changing the mustella tests for me and will be checking in shortly.
    Doc Notes: None
    Bugs: SDK-18042
    Reviewer: Hans
    tests: checkintests, Steve ran mustella tests for all of gumbo and states
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-18042
    Modified Paths:
    flex/sdk/trunk/development/eclipse/flex/flex4test/src/skins/CircularScrollBarSkin.mxml
    flex/sdk/trunk/development/eclipse/flex/flex4test/src/skins/CircularScrollBarTrackSkin.mx ml
    flex/sdk/trunk/development/eclipse/flex/flex4test/src/skins/MyScrollBarTrackSkin.mxml
    flex/sdk/trunk/development/eclipse/flex/flex4test/src/skins/MyVScrollBarSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButtonBar.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxListBase.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.a s
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxDefaultComplexItemRenderer. mxml
    flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/ITransformable.as
    flex/sdk/trunk/frameworks/projects/wireframe/src/wireframe/FxDefaultComplexItemRenderer.m xml
    flex/sdk/trunk/frameworks/projects/wireframe/src/wireframe/FxDefaultItemRenderer.mxml

    Dear friend,
    Check table: V_503_ALL 
    V_T512Z and V_511_B are the tables for assigment of Permissibility based on ESG and PSA
    After creating new EG/ESG (grouping also).
    Please note that when we update Employee Group/Subgroup of position in PP01, it is not effective to PF in master data which was maintained with that position & old Employee group/supgroup.
    So you should check:
    - Position
    - PFs with old EG/ESG.
    Regards
    Edited by: tungph on Oct 19, 2011 11:14 AM
    Edited by: tungph on Oct 19, 2011 11:17 AM

  • [svn:fx-trunk] 11641: A simple fix - we need to keep track of the display list index for non-clipping masks such as luminosity masks , not just alpha masks.

    Revision: 11641
    Author:   [email protected]
    Date:     2009-11-10 18:29:57 -0800 (Tue, 10 Nov 2009)
    Log Message:
    A simple fix - we need to keep track of the display list index for non-clipping masks such as luminosity masks, not just alpha masks.
    QE notes: Please include tests for multiple graphic content nodes with masks under a .
    Doc notes: N/A
    Bugs:
    SDK-24133 - Multiple non-Group maskees don't work when using maskType="luminosity"
    Reviewer: Deepa
    Tests run: Checkintests, Bug test case
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24133
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java

    Revision: 11641
    Author:   [email protected]
    Date:     2009-11-10 18:29:57 -0800 (Tue, 10 Nov 2009)
    Log Message:
    A simple fix - we need to keep track of the display list index for non-clipping masks such as luminosity masks, not just alpha masks.
    QE notes: Please include tests for multiple graphic content nodes with masks under a .
    Doc notes: N/A
    Bugs:
    SDK-24133 - Multiple non-Group maskees don't work when using maskType="luminosity"
    Reviewer: Deepa
    Tests run: Checkintests, Bug test case
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24133
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java

  • Where is documentations for Groups NWDI 7.11 like types NWDI.*  ?

    Where is documentations for Groups NWDI 7.11 like types NWDI.*  ?
    *NWDI.Administrators*
    **NWDI.Configurators     **
    **NWDI.Developers     **
    **NWDI.Guests     **
    **NWDI.Operators     **
    **NWDI.QManagers     **
    *NWDI.XDevelopers*

    check this doc it may give you some hints
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e0f341af-e86e-2910-3e8a-d9e3c227d938
    Thanks
    Bala Duvvuri

  • Multi-column Index vs One index for each column

    Hello everyone,
    i have one table about 20 000 000 rows, some developers have to generate reports on it and i want to create indexes on this table.
    The table has 34 columns, no primary key, no unique keys.
    The "where..." clause of the reports usually use 8 columns but some reports uses 8 + some other columns.
    can any one help me on what kind of indexes do i have to create?
    1. one index for each column used in "where clause"
    2. one index for 8 columns and some other indexes for other used columns
    3. one index for all columns
    or something else etc...
    br flag

    i have one table about 20 000 000 rows, some developers have to generate reports on it and i want to create indexes on this table.
    The table has 34 columns, no primary key, no unique keys.
    The "where..." clause of the reports usually use 8 columns but some reports uses 8 + some other columns.
    can any one help me on what kind of indexes do i have to create?
    1. one index for each column used in "where clause"
    2. one index for 8 columns and some other indexes for other used columns
    3. one index for all columns
    or something else etc...What's the version of your data base? what kind of database you have, DWH or OTLP? The answer might depend on the type of database as far as bitmap indexes might suit or might not depending if you are runing DWH or OLTP kind of database
    Let me suppose that you are runing OLTP database and you have a where clause with 8 columns.
    1) are all those where clause equalities (where col1 = and col2 =) or there are inequalities?
    2) could you evaluate the most repetitive columns?
    3) could you know the column that could have the best clustering factor (the column which most follow a certain order in the table)
    Based on that I would suggest to create one b-tree index having 8 columns (even though that it seems for me to high) this index should follow the following points:
    1) put the most repetitive column at the leading edge (and compress the index if necessary)
    2) put the columns that are used in equalitity predicate first
    3) put the column having the best clustering factor first
    The most precise index you have the best access you could gain.
    Of course that you have to know that an index access is not always good and a FULL table scan is not always bad.
    Best regards
    Mohamed Houri
    www.hourim.wordpress.com

Maybe you are looking for

  • Phone line out of order since 27th August

    Reported to BT 27th August, no response or progress until I chased on the online chat facility, told fault was with the BT network and would be fixed by 25th Sept.  Not fixed on 25th Sept so phoned BT who said it would be fixed by yesterday (30th Sep

  • I am making a Pages template, I want to have placeholder variables appear in 1 place.

    I want to make a document where I have two variables: project name and document name, but I want them to appear on the cover page and in the footer. I defined the placeholder text in both places, using the same names, but then when I fill in the cove

  • Zen V Plus - Track Playing Order Prob

    When? I rip a CD, put it on my Zen V Plus, then play the album, I can move through successi've tracks by moving the joystick to the right, so Track , Track 2, Track 3, etc..... However, I've just tried ripping the audio from a music DVD, which involv

  • Itunes/QT converts video from sound to no-sound

    I have a video that has sound. when i convert it for ipod or when I convert in QT to ipod, it ends up converted with no sound. Any thoughts? Thanks!

  • I REALLY NEED HELPP ASAPP!!!!!!

    Ok well im connected to a free wifi hotspot and is shows its connected but as i try to open any internet applications it tells me that it is unable to connect. the wifi hotspot is unsecure so i should have no problem with it but i do. I have the late