Help me in creatin an index for inequality operator  =

Hi Gurus,
I created an index as below
create index bu_eff_from_dt_indx on bu(eff_from_dt)
When I got the execution plan as below for this query
select * from bu
where eff_from_dt = '01-MAR-2006'
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 217 | 28644 | 43 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| BU | 217 | 28644 | 43 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | BU_EFF_FROM_DT_INDX | 217 | | 1 (0)| 00:00:01 |
The same is not working for <= operator.
select * from bu
where eff_from_dt <= '01-MAR-2006'
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 124K| 15M| 566 (3)| 00:00:07 |
|* 1 | TABLE ACCESS FULL| BU | 124K| 15M| 566 (3)| 00:00:07 |
The total records in this table is more than 2 lacs ..
Please help me to resolve this issue either by index or by partition or any other ..

An example:
SQL> drop table test;
Table dropped.
SQL> create table test as select * from all_objects;
Table created.
SQL> select count(*) from test;
  COUNT(*)
      9304
SQL> create index test_idx on test(object_id);
Index created.
SQL> analyze table test compute statistics;
Table analyzed.
SQL> set autotrace traceonly exp
SQL> select * from test where object_id = 1542;
Execution Plan
Plan hash value: 1389866015
| Id  | Operation                   | Name     | Rows  | Bytes | Cost (%CPU)| Ti
me     |
|   0 | SELECT STATEMENT            |          |     1 |    76 |     2   (0)| 00
:00:01 |
|   1 |  TABLE ACCESS BY INDEX ROWID| TEST     |     1 |    76 |     2   (0)| 00
:00:01 |
|*  2 |   INDEX RANGE SCAN | TEST_IDX |     1 |       |     1   (0)| 00
:00:01 |
Predicate Information (identified by operation id):
   2 - access("OBJECT_ID"=1542)
SQL> select * from test where object_id < 1542;
Execution Plan
Plan hash value: 1389866015
| Id  | Operation                   | Name     | Rows  | Bytes | Cost (%CPU)| Ti
me     |
|   0 | SELECT STATEMENT            |          |  1396 |   103K|    24   (0)| 00
:00:01 |
|   1 |  TABLE ACCESS BY INDEX ROWID| TEST     |  1396 |   103K|    24   (0)| 00
:00:01 |
|*  2 |   INDEX RANGE SCAN | TEST_IDX |  1396 |       |     4   (0)| 00
:00:01 |
Predicate Information (identified by operation id):
   2 - access("OBJECT_ID"<1542)
SQL> select * from test where object_id < 5000;
Execution Plan
Plan hash value: 1357081020
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT  |      |  4529 |   336K|    36   (0)| 00:00:01 |
|*  1 |  TABLE ACCESS FULL| TEST |  4529 |   336K|    36   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   1 - filter("OBJECT_ID"<5000)
SQL>

Similar Messages

  • Best index for Between operator

    I have a table abc where create_date column with date datatype.
    My table abc is having one million row,
    my query is some thing like
    select * from abc
    where create_Date between :low_date and :high_date;
    Ideally if I use the same query in my report it is taking 15 hrs for one month of data and in normal case it is doing Full Table Scan of abc.
    So I want to create an index, Please let me know what type of index will give me the performance improvement. (expected 4 to 5 hours).

    Alex wrote:
    Hi,
    Create a NON-Unique Bitmap Index for create_Date column.
    CREATE INDEX Your_Index_Name ON Your_table_Name
    (create_Date )
    LOGGING
    PARALLEL ( DEGREE Default INSTANCES Default );Even you ahve 1 million records, 15 hours is too far from the normal situation.
    So ones after you create teh index check the report again.
    if it takes more time then execute the same query in sql plus or any other sql interface and see how long it takes to retrive all details.
    Sometimes this slowness can caused by the report you use. Not exactly from the sql query.Probably not a great idea since we have no idea what this table is, how it's loaded, if it's transactional or data-warehouse oriented.
    Your "solution" could well cause a myriad of performance problems outside of the OP's original query. And it will almost certainly not be the solution to their problem. As i stated in my post, and you have also mentioned ... 15 hours to read 1 million rows is indicative of a serious problem, no single index is going to fix that.

  • I need urgent help in business catalyst SOAP api for [Product_UpdateInsert] operation.

    Hi Everyone, I am new in Business Catalyst, but, my company is working with BC for a while. I have a task to import external data (such as catalogue, products, orders, shopping cart etc) to business catalyst native tables via SOAP api. I am able to use "Product_ListRetrieve" function that gave me products from BC. Now I want to insert and update product list, for which the api call is "Product_UpdateInsert". I am not being able to feed in even a single record. I need any code (jquery, php, javascript, java etc) as a sample, that works with SOAP api for this function. It is very urgent. Please help me. Thanks in advance. I have tried with the code below, but I am getting bugs (format not valid):
    try
         $soapfileurlUpdate="https://worldsecuresystems.com/catalystwebservice/catalystecommercewebservice.asmx?wsdl";
         $soap_clientUpdate = new SoapClient($soapfileurlUpdate);
         $array_of_products=array("Products",
      array("productId"=>"1128",
       "productCode"=>"1128",
               "productName"=>"Bostik 1128  Heat Transfer Sealer (thermo Putty) 460g Cartridge",
               "description"=>"Bostik 1128  Heat Transfer Sealer (thermo Putty) 460g Cartridge",
               "smallImage"=>"images/products/TEMUFF-7_New.jpg",
               "largeImage"=>"/images/products/TEMUFF-7.jpg",
               "cataloguesArray"=>array("DUCTS"), //array("string"=>"DUCTS"),
               "pricesSaleArray"=>array("US/9.95"),//array("string"=>"US/9.95"),
               "pricesRetailArray"=>array("US/9.95"),
               "pricesWholesaleArray"=>array("US/5.00"),
               "wholesaleTaxCodeArray"=>array("US/0.00"),
               "taxCodeArray"=>array("GB/VAT"),
               "groupProducts"=>array(""),
               "groupProductsDescriptions"=>array(""),
               "supplierEntityId"=>"1",
               "supplierCommission"=>"2",
               "weight"=>"20",
               "relatedProducts"=>array(""),
               "tags"=>"",
               "unitType"=>"",
               "minUnits"=>"1",
               "maxUnits"=>"2",
               "inStock"=>"10",
               "onOrder"=>"0",
               "reOrder"=>"0",
               "inventoryControl"=>"true",
               "canPreOrder"=>"0",
               "custom1"=>"",
               "custom2"=>"",
               "custom3"=>"",
               "custom4"=>"",
               "popletImages"=>"",
               "enabled"=>"true",
               "deleted"=>"false",
               "captureDetails"=>"true",
               "downloadLimitCount"=>"22",
               "limitDownloadsToIP"=>"0",
               "isOnSale"=>"true",
               "hideIfNoStock"=>"false",
               "productAttributes"=>"Size*|5|N:Small|,Medium|,Large|;Color*|5|N:Red|,Wh",
               "isGiftVoucher"=>"false",
               "enableDropShipping"=>"true",
               "productWeight"=>"20",
               "productWidth"=>"20",
               "productHeight"=>"29",
               "productDepth"=>"20",
               "excludeFromSearch"=>"0",
               "productTitle"=>"Bostik 1128  Heat Transfer Sealer (thermo Putty) 460g Cartridge",
               "cycletypeId"=>"1",
               "cycletypeCount"=>"1",
               "slug"=>"item-1",
               "hasVariations"=>"false",
               //"variations"=>array("ProductVariation"=>"true"),
               "roleResponsible"=>"",
               "metaDescription"=>""));
      echo "SOAP Data To Be Inserted:<br/>";
      var_dump($array_of_products);
      $vectUpdate = array("soap_version"   => SOAP_1_2,
                     "username"=>$soapusername,
                     "password" => $soappassword,
                     "siteId"=> $soapsiteid,
                     "productList"=>$array_of_products);
      $quoteUpdate = $soap_clientUpdate->Product_UpdateInsert($vectUpdate);
         $status = 1;
      echo "BC side is updated.";
      catch (SoapFault $sf)
         $errorlogText=date("Y-m-d h:i:s A"). "=> Error occurred while inserting data to business catalyst. \r\n";
      echo $errorlogText. " See log for errors.\r\n";
      echo $sf->getTrace();
      //fwrite($errorLogFile,$errorlogText. "Error Dump: ". $sf->getMessage());
      return;

    Hi BCMan, Thanks for replying. Yes, the error is from BC side. The format was invalid. I fixed the issue today. Actually, I was pushing data from my PHP server to BC host system using SOAP api. I am still getting format errors, but I am able to insert data into products table.
    One more question if you don't mind. Is it possible to use JQuery/Javascript to push data into BC tables in real time (while browsing products table) using customized pages? There are documents to solve this. However, I could not find examples of how I could fetch data from JSON file using JQuery and then populate products/catalog/order tables.
    I appreciate your help.
    Thank you.

  • 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>

  • How to use multithreading for asynchronous operation

    hi! i am really new to java, i want to improve the performance of my code, some suggested to implement asynchronous operation using multithreading. Please help me how to use multithreading for asynchronous operation. thanks in advance.

    http://java.sun.com/docs/books/tutorial/essential/threads/
    Note, however, that just making something multithreaded won't necessarily improve performance. You either need multiple CPUs or there needs to be some I/O going on that blocks while something else could be done--other I/O or computing.

  • Hi all, where can i get a good refrence for Indexing for Tables..... HELP!

    hi all, where can i get a good refrence for Indexing for Tables..... HELP!
    i am looking for a information on indexing of tables.'
    Saurabh

    Thanks Mamta.........
    but meanwhile i got this link...check it out
    http://help.sap.com/saphelp_nw70/helpdata/en/cf/21eb20446011d189700000e8322d00/content.htm
    [http://help.sap.com/saphelp_nw70/helpdata/en/cf/21eb20446011d189700000e8322d00/content.htm]

  • Please help me create the indexes for this XML

    Hi Mark and others,
    What is the way to create the correct index for this kind of XML (I posted earlier)? I created the indexes without using those prefixes without any problems but they do not seem to be used during processing. For 300 statutes, it took about 10 minutes! For the smplier verion, I created indexes and it took no more than 30 seconds to process more than 4000 statutes.
    <AllStatuteQueryResponse xmlns="http://crimnet.state.mn.us/mnjustice/statute/service/3.0">
    <ns1:Statutes xmlns:ns1="http://crimnet.state.mn.us/mnjustice/statute/messages/3.0">
    <ns1:Statutes>
    <ns2:StatuteId xmlns:ns2="http://crimnet.state.mn.us/mnjustice/statute/3.0">1</ns2:StatuteId>
    <ns3:Chapter xmlns:ns3="http://crimnet.state.mn.us/mnjustice/statute/3.0">84</ns3:Chapter>
    <ns4:Section xmlns:ns4="http://crimnet.state.mn.us/mnjustice/statute/3.0">82</ns4:Section>
    <ns5:Subdivision xmlns:ns5="http://crimnet.state.mn.us/mnjustice/statute/3.0">1a</ns5:Subdivision>
    <ns6:Year xmlns:ns6="http://crimnet.state.mn.us/mnjustice/statute/3.0">0</ns6:Year>
    <ns7:LegislativeSessionCode xmlns:ns7="http://crimnet.state.mn.us/mnjustice/statute/3.0">
    <ns7:StatuteCode>
    <ns7:code>4</ns7:code>
    <ns7:description>4</ns7:description>
    </ns7:StatuteCode>
    </ns7:LegislativeSessionCode>
    <ns8:SessionTextIndicator xmlns:ns8="http://crimnet.state.mn.us/mnjustice/statute/3.0">false</ns8:SessionTextIndicator>
    <ns9:HeadNoteIndicator xmlns:ns9="http://crimnet.state.mn.us/mnjustice/statute/3.0">false</ns9:HeadNoteIndicator>
    <ns10:EffectiveDate xmlns:ns10="http://crimnet.state.mn.us/mnjustice/statute/3.0">1859-01-01</ns10:EffectiveDate>
    <ns11:EnactmentDate xmlns:ns11="http://crimnet.state.mn.us/mnjustice/statute/3.0">1859-01-01</ns11:EnactmentDate>
    <ns12:RepealedIndicator xmlns:ns12="http://crimnet.state.mn.us/mnjustice/statute/3.0">false</ns12:RepealedIndicator>
    <j:DocumentLocationURI xmlns:j="http://www.it.ojp.gov/jxdm/3.0.2">
    <j:ID xsi:type="j:TextType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">http://www.revisor.leg.state.mn.us/stats/84/82.html</j:ID>
    </j:DocumentLocationURI>
    <ns13:SummaryDescriptionText xmlns:ns13="http://crimnet.state.mn.us/mnjustice/statute/3.0">Snowmobiles-Snowmobile registration</ns13:SummaryDescriptionText>
    <ns14:StatuteFunction xmlns:ns14="http://crimnet.state.mn.us/mnjustice/statute/3.0">
    <ns14:StatuteIntegrationId>1</ns14:StatuteIntegrationId>
    Thanks!
    Ben

    Hi Mark, here is the schema. I did not register the schema, because when I processed the simpler version, I did not either and I just created the indexes. I did not create an VARRAY in the table. The DDL is simply create table CStatute_XML(id number, xmldoc xmltype).
    Schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- CriMNet -->
    <!-- Minnesota Criminal Justice Statute Web Service Data Dictionary -->
    <!-- Dave Everson -->
    <!-- Version 3.0 -->
    <xsd:schema targetNamespace="http://crimnet.state.mn.us/mnjustice/statute/3.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="3.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://crimnet.state.mn.us/mnjustice/statute/3.0">
         <xsd:element name="StatuteCode">
              <xsd:annotation>
                   <xsd:documentation>
                        This complex type is a generic structure representing code value sets defined in the Minnesota Criminal Justice Statute Service.
                        A single element of the value set contains both a code value (e.g. F) and a description (e.g. Felony).
                        The following concepts within the MNCJSS are represented by this complex type:
                             OffenseSummary
                             OffenseSummarySeverityLevel
                             LegislativeSession
                             Function
                             OffenseLevel
                             OffenseSeverityLevel
                             DetailedOffenseCode
                             GeneralOffenseCode
                   </xsd:documentation>
              </xsd:annotation>
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element name="code" type="xsd:string"/>
                        <xsd:element name="description" type="xsd:string"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="StatuteId" type="xsd:integer">
              <xsd:annotation>
                   <xsd:documentation>Primary Key reference to Minnesota Criminal Justice Statute Service disseminated by CriMNet</xsd:documentation>
                   <xsd:appinfo>Statute.statuteId</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="StatuteIntegrationId" type="xsd:integer">
              <xsd:annotation>
                   <xsd:documentation>Primary Key reference to the StatuteFunction object within the Minnesota Criminal Justice Statute Service disseminated by CriMNet</xsd:documentation>
                   <xsd:appinfo>StatuteFunction.statuteIntegrationId</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="FunctionCode">
              <xsd:annotation>
                   <xsd:documentation>TBD</xsd:documentation>
                   <xsd:appinfo>StatuteFunction.Function</xsd:appinfo>
              </xsd:annotation>
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="StatuteCode"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="OffenseSummaryCode">
              <xsd:annotation>
                   <xsd:documentation>TBD</xsd:documentation>
                   <xsd:appinfo>StatuteFunction.OffenseSummary</xsd:appinfo>
              </xsd:annotation>
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="StatuteCode"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="OffenseSummarySeverityLevelCode">
              <xsd:annotation>
                   <xsd:documentation>TBD</xsd:documentation>
                   <xsd:appinfo>StatuteFunction.OffenseSummary.OffenseSummarySeverityLevel</xsd:appinfo>
              </xsd:annotation>
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="StatuteCode"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="OffenseLevelCode">
              <xsd:annotation>
                   <xsd:documentation>TBD</xsd:documentation>
                   <xsd:appinfo>StatuteFunction.OffenseLevel</xsd:appinfo>
              </xsd:annotation>
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="StatuteCode"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="OffenseSeverityLevelCode">
              <xsd:annotation>
                   <xsd:documentation>TBD</xsd:documentation>
                   <xsd:appinfo>StatuteFunction.OffenseSeverityLevel</xsd:appinfo>
              </xsd:annotation>
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="StatuteCode"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="LegislativeSessionCode">
              <xsd:annotation>
                   <xsd:documentation>TBD</xsd:documentation>
                   <xsd:appinfo>StatuteChapterSection.LegislativeSession</xsd:appinfo>
              </xsd:annotation>
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="StatuteCode"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="GeneralOffenseCode" nillable="true">
              <xsd:annotation>
                   <xsd:documentation>An integer (1-9) identifier of a general statute category code used for statistical analysis.</xsd:documentation>
                   <xsd:appinfo>StatuteFunction.DetailedOffenseCode.GeneralOffenseCode</xsd:appinfo>
              </xsd:annotation>
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="StatuteCode"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="DetailedOffenseCode" nillable="true">
              <xsd:annotation>
                   <xsd:documentation>An identification number associated with a statute offense type in the form of nnn.nnn. From a list of 350. Corresponds to the StatuteOffinseTypeText.</xsd:documentation>
                   <xsd:appinfo>StatuteFunction.DetailedOffenseCode</xsd:appinfo>
              </xsd:annotation>
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="StatuteCode"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="Chapter" type="xsd:string">
              <xsd:annotation>
                   <xsd:documentation>A numeric identifier of a chapter within a statute.</xsd:documentation>
                   <xsd:appinfo>Statute.chapter; StatuteChapterSection.chapter</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="Section" type="xsd:string" nillable="true">
              <xsd:annotation>
                   <xsd:documentation>An integer number identifier of a section of a chapter of a statute.</xsd:documentation>
                   <xsd:appinfo>Statute.section; StatuteChapterSection.section</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="Subdivision" type="xsd:string" nillable="true">
              <xsd:annotation>
                   <xsd:documentation>An identifier of a subdivision within a code book.</xsd:documentation>
                   <xsd:appinfo>Statute.subdivision</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="HeadNoteIndicator" type="xsd:boolean">
              <xsd:annotation>
                   <xsd:documentation></xsd:documentation>
                   <xsd:appinfo>StatuteChapterSection.headNote</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>     
         <xsd:element name="Year" type="xsd:int">
              <xsd:annotation>
                   <xsd:documentation>TBD</xsd:documentation>
                   <xsd:appinfo>StatuteChapterSection.year</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="EffectiveDate" type="xsd:date" nillable="true">
              <xsd:annotation>
                   <xsd:documentation>The date a statute came into effect</xsd:documentation>
                   <xsd:appinfo>Statute.effectiveDate</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="ExpirationDate" type="xsd:date" nillable="true">
              <xsd:annotation>
                   <xsd:documentation>The date a statute was not longer effective.</xsd:documentation>
                   <xsd:appinfo>Statute.effectiveDate</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="EnactmentDate" type="xsd:date" nillable="true">
              <xsd:annotation>
                   <xsd:documentation>A date a statute was signed into law.</xsd:documentation>
                   <xsd:appinfo>Statute.enactmentDate</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="RepealedIndicator" type="xsd:boolean">
              <xsd:annotation>
                   <xsd:documentation>A date a statute number was repealed, amended, or renumbered.</xsd:documentation>
                   <xsd:appinfo>Statute.repealedFlag</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="HeadNote" type="xsd:boolean">
              <xsd:annotation>
                   <xsd:documentation></xsd:documentation>
                   <xsd:appinfo>Statute.headNote</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="SummaryDescriptionText" type="xsd:string" nillable="true">
              <xsd:annotation>
                   <xsd:documentation>A long description of a statute.</xsd:documentation>
                   <xsd:appinfo>Statute.summaryText</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="LegislativeText" type="xsd:string" nillable="true">
              <xsd:annotation>
                   <xsd:documentation>The legislative of a statute.</xsd:documentation>
                   <xsd:appinfo>StatuteChapterSection.legislativeText</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>     
         <xsd:element name="SessionTextIndicator" type="xsd:boolean">
              <xsd:annotation>
                   <xsd:documentation></xsd:documentation>
                   <xsd:appinfo>StatuteChapterSection.sessionTextFlag</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>     
         <xsd:element name="FunctionText" type="xsd:string" nillable="true">
              <xsd:annotation>
                   <xsd:documentation></xsd:documentation>
                   <xsd:appinfo>StatuteFunction.functionText</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="JuvenileOnlyIndicator" type="xsd:boolean">
              <xsd:annotation>
                   <xsd:documentation>An indicator identifying whether a statute applies to juveniles only.</xsd:documentation>
                   <xsd:appinfo>StatuteFunction.juvenileOnlyFlag</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="CrimeOfViolenceIndicator" type="xsd:boolean">
              <xsd:annotation>
                   <xsd:documentation>An indicator identifying whether a statute is a crime of violence under Minnesota statute 624 section 712 subdivision 5.</xsd:documentation>
                   <xsd:appinfo>StatuteFunction.crimeOfViolenceFlag</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="EnhanceableIndicator" type="xsd:boolean">
              <xsd:annotation>
                   <xsd:documentation>An indicator identifying whether the charges are enhanceable by specific factors (the definition of enhanceable is pending review).</xsd:documentation>
                   <xsd:appinfo>StatuteFunction.enhanceableFlag</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="TargetedMisdemeanorIndicator" type="xsd:boolean">
              <xsd:annotation>
                   <xsd:documentation>An indicator identifying whether a statute is a targeted misdemeanor as defined in Minnnesota Statute 299C.10, subdivision. 1(d).</xsd:documentation>
                   <xsd:appinfo>StatuteFunction.targetedMisdemeanorFlag</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="MandatoryAppearanceIndicator" type="xsd:boolean">
              <xsd:annotation>
                   <xsd:documentation></xsd:documentation>
                   <xsd:appinfo>StatuteFunction.mandatoryAppearanceFlag</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="RegisterableOffenseIndicator" type="xsd:boolean">
              <xsd:annotation>
                   <xsd:documentation></xsd:documentation>
                   <xsd:appinfo>StatuteFunction.registerableOffenseFlag</xsd:appinfo>
              </xsd:annotation>
         </xsd:element>
         <xsd:element name="StatuteFunction">
              <xsd:annotation>
                   <xsd:documentation></xsd:documentation>
                   <xsd:appinfo>StatuteFunction</xsd:appinfo>
              </xsd:annotation>
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="StatuteIntegrationId" />
                        <xsd:element ref="FunctionCode"/>
                        <xsd:element ref="FunctionText" minOccurs="0" maxOccurs="1"/>                    
                        <xsd:element ref="CrimeOfViolenceIndicator"/>
                        <xsd:element ref="EnhanceableIndicator"/>
                        <xsd:element ref="TargetedMisdemeanorIndicator"/>
                        <xsd:element ref="RegisterableOffenseIndicator"/>                    
                        <xsd:element ref="JuvenileOnlyIndicator"/>
                        <xsd:element ref="MandatoryAppearanceIndicator"/>                                        
                        <xsd:element ref="OffenseLevelCode" minOccurs="0" maxOccurs="1"/>
                        <xsd:element ref="GeneralOffenseCode" minOccurs="0" maxOccurs="1"/>
                        <xsd:element ref="DetailedOffenseCode" minOccurs="0" maxOccurs="1"/>
                        <xsd:element ref="OffenseSummaryCode" minOccurs="0" maxOccurs="1"/>
                        <xsd:element ref="OffenseSummarySeverityLevelCode" minOccurs="0" maxOccurs="1"/>
                        <xsd:element ref="OffenseSeverityLevelCode" minOccurs="0" maxOccurs="1"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
    </xsd:schema>
    Query:
    first part to get the statute ID numbers,
    insert into CriMNet_Statutes
         select cs.StatuteId, cs.Chapter, cs.Section, cs.Subdivision, cs.Year, cs.LegCode,
              cs.LegDesc, cs.SessionTextIndicator, cs.HeadNoteIndicator,
              to_date(cs.EffectiveDate, 'yyyy/mm/dd') as eDate,
              to_date(cs.EnactmentDate, 'yyyy/mm/dd') as EnDate,
              cs.RepealedIndicator, cs.SummaryDescriptionText
         from Cstatute_xml,          
         xmltable
              xmlnamespaces
                   default 'http://crimnet.state.mn.us/mnjustice/statute/3.0',     
                   --- or 'http://crimnet.state.mn.us/mnjustice/statute/3.0' as "cs"
                   'http://crimnet.state.mn.us/mnjustice/statute/service/3.0' as "cx",
                   'http://crimnet.state.mn.us/mnjustice/statute/messages/3.0' as "ns1"                    
              '/cx:AllStatuteQueryResponse/ns1:Statutes/ns1:Statutes'               
              --- '/AllStatuteQueryResponse//ns:Statutes' --- produces an extra row
              passing SXMLDOC
              columns
              StatuteId     varchar2(10)     path '//StatuteId',
              Chapter          varchar2(10)     path '//Chapter',
              Section          varchar2(20)     path '//Section',
              Subdivision     varchar2(20)     path '//Subdivision',
              Year          number          path '//Year',     
              LegCode          varchar2(10)     path '//LegislativeSessionCode/StatuteCode/code',
              LegDesc          varchar2(10)     path '//LegislativeSessionCode/StatuteCode/description',
              SessionTextIndicator varchar2(10) path '//SessionTextIndicator',
              HeadNoteIndicator varchar2(10)     path '//HeadNoteIndicator',
              EffectiveDate     varchar2(15)     path '//EffectiveDate',
              EnactmentDate     varchar2(15)     path '//EnactmentDate',
              RepealedIndicator varchar2(10)     path '//RepealedIndicator',
              SummaryDescriptionText varchar2(150) path '//SummaryDescriptionText'     
         ) cs;
    Second part to get the function code for each statute ID (one ID to many function codes).
    declare
              v_statuteID     number;
              v_statuteIDC     varchar2(10);
              cursor c_cmns is
              select statuteid from CriMNet_Statutes;
         begin
              for v_cmns in c_cmns loop
                   v_StatuteID := v_cmns.StatuteID;
                   v_statuteIDC := to_char(v_statuteID);
                   insert into CriMNet_Statute_Function
                   select v_StatuteID, cf.* from Cstatute_xml,
                   xmltable
                        xmlnamespaces
                             'http://crimnet.state.mn.us/mnjustice/statute/3.0' as "cs",
                             'http://crimnet.state.mn.us/mnjustice/statute/service/3.0' as "cx",
                             'http://crimnet.state.mn.us/mnjustice/statute/messages/3.0' as "ns1"                         
                        'for $cxm in /cx:AllStatuteQueryResponse/ns1:Statutes/ns1:Statutes[cs:StatuteId = $val/pStatuteId]/cs:StatuteFunction
                        return
                        <cs:CSFunction>
                             <cs:StatuteIntegrationId>{$cxm//cs:StatuteIntegrationId}</cs:StatuteIntegrationId>
                             <cs:FunctionCode>{$cxm//cs:FunctionCode/cs:StatuteCode/cs:code}</cs:FunctionCode>
                             <cs:FunctionDesc>{$cxm//cs:FunctionCode/cs:StatuteCode/cs:description}</cs:FunctionDesc>
                             <cs:CrimeOfViolenceIndicator>{$cxm//cs:CrimeOfViolenceIndicator}</cs:CrimeOfViolenceIndicator>
                             <cs:EnhanceableIndicator>{$cxm//cs:EnhanceableIndicator}</cs:EnhanceableIndicator>
                             <cs:TargetedMisdIndicator>{$cxm//cs:TargetedMisdemeanorIndicator}</cs:TargetedMisdIndicator>
                             <cs:RegisterableOffIndicator>{$cxm//cs:RegisterableOffenseIndicator}</cs:RegisterableOffIndicator>
                             <cs:JuvenileOnlyIndicator>{$cxm//cs:JuvenileOnlyIndicator}</cs:JuvenileOnlyIndicator>
                             <cs:MandatoryAppIndicator>{$cxm//cs:MandatoryAppearanceIndicator}</cs:MandatoryAppIndicator>
                             <cs:OffenseLevelCode>{$cxm//cs:OffenseLevelCode/cs:StatuteCode/cs:code}</cs:OffenseLevelCode>
                             <cs:OffenseLevelDesc>{$cxm//cs:OffenseLevelCode/cs:StatuteCode/cs:description}</cs:OffenseLevelDesc>
                             <cs:GeneralOffenseCode>{$cxm//cs:GeneralOffenseCode/cs:StatuteCode/cs:code}</cs:GeneralOffenseCode>
                             <cs:GeneralOffenseDesc>{$cxm//cs:GeneralOffenseCode/cs:StatuteCode/cs:description}</cs:GeneralOffenseDesc>
                             <cs:DetailedOffenseCode>{$cxm//cs:DetailedOffenseCode/cs:StatuteCode/cs:code}</cs:DetailedOffenseCode>
                             <cs:DetailedOffenseDesc>{$cxm//cs:DetailedOffenseCode/cs:StatuteCode/cs:description}</cs:DetailedOffenseDesc>
                             <cs:OffenseSummaryCode>{$cxm//cs:OffenseSummaryCode/cs:StatuteCode/cs:code}</cs:OffenseSummaryCode>
                             <cs:OffenseSummaryDesc>{$cxm//cs:OffenseSummaryCode/cs:StatuteCode/cs:description}</cs:OffenseSummaryDesc>
                             <cs:OffenseSumSeverityLevelCode>{$cxm//cs:OffenseSummarySeverityLevelCode/cs:StatuteCode/cs:code}</cs:OffenseSumSeverityLevelCode>
                             <cs:OffenseSumSeverityLevelDesc>{$cxm//cs:OffenseSummarySeverityLevelCode/cs:StatuteCode/cs:description}</cs:OffenseSumSeverityLevelDesc>
                        </cs:CSFunction>'                              
                        passing SXMLDOC, xmlelement("pStatuteId", v_statuteIDC) as "val"
                        columns
                        StatuteIntegrationId     number     path '/cs:CSFunction/cs:StatuteIntegrationId',
                        FunctionCode          varchar2(10) path '/cs:CSFunction/cs:FunctionCode',
                        FunctionDesc          varchar2(30)     path '/cs:CSFunction/cs:FunctionDesc',
                        CrimeOfViolenceIndicator varchar2(10)     path '/cs:CSFunction/cs:CrimeOfViolenceIndicator',
                        EnhanceableIndicator     varchar2(10)     path '/cs:CSFunction/cs:EnhanceableIndicator',
                        TargetedMisdIndicator     varchar2(10)     path '/cs:CSFunction/cs:TargetedMisdIndicator',
                        RegisterableOffIndicator varchar2(10)     path '/cs:CSFunction/cs:RegisterableOffIndicator',
                        JuvenileOnlyIndicator     varchar2(10)     path '/cs:CSFunction/cs:JuvenileOnlyIndicator',
                        MandatoryAppIndicator     varchar2(10)     path '/cs:CSFunction/cs:MandatoryAppIndicator',
                        OffenseLevelCode     varchar2(10)     path '/cs:CSFunction/cs:OffenseLevelCode',
                        OffenseLevelDesc     varchar2(40)     path '/cs:CSFunction/cs:OffenseLevelDesc',
                        GeneralOffenseCode     varchar2(10)     path '/cs:CSFunction/cs:GeneralOffenseCode',
                        GeneralOffenseDesc     varchar2(60)     path '/cs:CSFunction/cs:GeneralOffenseDesc',
                        DetailedOffenseCode     varchar2(10)     path '/cs:CSFunction/cs:DetailedOffenseCode',
                        DetailedOffenseDesc     varchar2(60)     path '/cs:CSFunction/cs:DetailedOffenseDesc',
                        OffenseSummaryCode     varchar2(10)     path '/cs:CSFunction/cs:OffenseSummaryCode',
                        OffenseSummaryDesc     varchar2(60)     path '/cs:CSFunction/cs:OffenseSummaryDesc',
                        OffenseSumSeverityLevelCode varchar2(10)     path '/cs:CSFunction/cs:OffenseSumSeverityLevelCode',
                        OffenseSumSeverityLevelDesc varchar2(30)     path '/cs:CSFunction/cs:OffenseSumSeverityLevelDesc'          
                   ) cf;
                   ---dbms_output.put_line('Statute ID = ' || v_StatuteID);
              end loop;
         end;
    You mentioned that I should include the namespace in the existsnode function but I did not. I am going to try after including it. Thanks.
    Ben

  • 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

  • Can Oracle be forced to use the spatial index for sdo_filter in combination with an or clause? Difference between Enterprise and SE?

    We’re seeing the following issue: sql - Can Oracle be forced to use the spatial index for sdo_filter in combination with an or clause? - Stack Overflow (posted by a colleague of mine) and are curious to know if this behaviour is due to a difference between standard and enterprise, or could we doing something else wrong in our DB config.?
    We have also reproduced the issue on the following stacks:
    Oracle SE One 11.2.0.3 (with Spatial enabled)
    Redhat Linux 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
    11.2.0.3.0 Standard Edition and 11.2.0.4.0 Standard Edition (both with Spatial enabled)
    Microsoft Windows Server 2003R2 Standard x64 Edition
    However, the SQL works fine if we try it on Oracle 11.2.0.3.0 *Enterprise* Edition.
    Any help or advice would be much appreciated.
    Kindest Regards,
    Kevin

    In my experience sdo_filter ALWAYS uses the spatial index, so that's not the problem. Since you did not provide the explain plans, we can't say for sure but I think yhu is right: Standard Edition can't use the bitmap operations, and thus it'll take longer to combine the results of the two queries (because the optimizer will surely split this OR up in two parts, then combine them).
    BTW: when asking questions about queries here, it would be nice if you posted the queries here as well, so that we do not have to check another website in order to see what you are doing. Plus it will probably get you more answers, because not everyone can be bothered to click on that link. It would also have been nice if you had posted your own answer on the other post here as well, because my recommendation would have been to use union all - but since you already found that out for yourself my recommendation would have been a little late.

  • How to delete the index for the business object BUS0033

    Hi to all experts,
    I'm applying note 1349496 the error here is no records with F4 help for the funds center .
    solution from the note
    Implement the attached program corrections. Then, in the transaction, delete the index for the business object BUS0033, reactivate it, and start the indexing in the indexing mode "Full". The system then displays the data correctly in the F4 search help.
    how to do the second part i have already applied the note .

    any help

  • TREX index for Records management in CRM

    Hi All,
    Hopefully this is the correct forum to post this question, if not please let me know the correct one.
    Does anyone have any information on linking TREX to RMPS?
    This is to resolve an issue where the case search on business partner first and last name fields are case sensitive in the electronic desk.  In the DMWB we have ticked the Index-Relevant option but have been advised that we also need the link to TREX.
    I have set up a TREX search index for the Solutions database in the past but setting this up for Records management doesn't seem to be as easy.
    Many thanks in advance.
    Gary Hawkins

    Hi Vishnu,
    Try this BAPI: BAPI_BUSPROCESSND_CREATEMULTI
    BAPI_BUSPROCESSND_SAVE
    Regards
    Arun Kumar
    Rewards Points if it helps.

  • How do I stop the indexing on my MacBook Pro? It's been indexing for 2 days.

    How do I stop the indexing on my MacBook Pro? It's been indexing for 2 days.

    Step 1
    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Triple-click anywhere in the line below on this page to select it:
    syslog -F '$Time $Message' -k Sender mdworker -o -k Message Rne Norm -k Sender mds | tail | pbcopy
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    Paste into the Terminal window by pressing the key combination command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    The command may take a noticeable amount of time to run. Wait for a new line ending in a dollar sign ($) to appear.
    The output of the command will be automatically copied to the Clipboard. If the command produced no output, the Clipboard will be empty. Paste into a reply to this message. 
    The Terminal window doesn't show the output. Please don't copy anything from there.
    If any personal information appears in the output, anonymize before posting, but don’t remove the context.
    Step 2
    Enter the following command as in Step 1 and post the output:
    mdutil -as 2>&- | pbcopy
    You can then quit Terminal.
    Step 3
    Launch the Console application in the same way you launched Terminal. In the Console window, look under the heading DIAGNOSTIC AND USAGE INFORMATION on the left for crash reports related to Spotlight. If you don't see that heading, select
              View ▹ Show Log List
    from the menu bar. A Spotlight crash report has a name beginning in "mds" or "mdworker" and ending in ".crash". Select the most recent such report, if any, from the System and User subcategories and post the entire contents—the text, please, not a screenshot. In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    Please don’t post any other kind of diagnostic report, such as hang logs—they're very long and not helpful.

  • Index for a PSA table is not in the "customer" namespace

    Hi,
    While loading data through infosource 0CO_OM_WBS_1 to
    data target 0IMFA_1 loading failes and the reason given is that the system reads data from PSA table /BIC/B0001060000 of 0IM_FA_IQ_9 and the index generated for this table supplied return code 14.
    I found no notes in the subject - with the syntax :
    Index for a PSA table is not in the "customer" namespace.
    thanks in advance for your help.

    Hi,
    I think you need to speak to your basis guys / DBA as index created on PSA table is not in your tablespace. He should be able to help you.
    Vikash

  • 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?

  • ABAP Routine for Deleting and creating index for ODS in Process chains

    Any pointers for the ABAP Routine code for deleting and creating index for ODS in Process chains.

    Hi Sachin,
    find the following ABAP code to delete ODS ondex.
    data : v_ods type RSDODSOBJECT.
    move 'ODSname' to v_ods .
    CALL FUNCTION 'RSSM_PROCESS_ODS_DROP_INDEXES'
      EXPORTING
        I_ODS = v_ods.
    To create index:
    data : v_ods type RSDODSOBJECT.
    move 'ODSname' to v_ods .
    CALL FUNCTION 'RSSM_PROCESS_ODS_CREA_INDEXES'
      EXPORTING
        I_ODS = v_ods.
    hope it helps....
    regards,
    Raju

Maybe you are looking for

  • Is there a way to back up data from the ios simulator

    I have an Ipad app and I want to see if you can back up the data. Is there a way you can do this using the ios simulator and loading all of the data that you have on it onto the computer then back onto the ios simulator. I am using an sqlite database

  • Filtering recordset with session variable

    This has never happened to me before, but for some reason, my recordset that drives a dynamic table won't filter results based on a session variable. I know session variables are working because I have the session variable echo on the page (dragged-n

  • Downgrading to m505 from Lifedrive - Maybe You can HELP

    Greetings I recently lost my livedrive. I have reset my m505 and try to synchronise but m505 couldnt connect to my PalmDesktop ver 4.1.4. Question - How do i synchronise my contact details to my old m505. Thank you. Post relates to: Palm m505

  • Hr forms workplace

    Hi, I am learning <b>tools for HR Forms</b> in help.sap.com  by own. In hr forms workplace i hav transfered Required things in MetaNet to InfoNet.when i click Layout smartform opened.I created one text under window.But i cant drag and drop fields fro

  • Photoshop CS5 print dialog

    I am trying to print with my new 27" imac i7 (G5 forced upgrade), Snow Leopard, Epson 4000, Epson Driver 8.19 and Pshop CS5 and having a weird thing occur. In the past (CS4 on G5) I have always gone into the Pshop print dialog box and shrunk the imag