Oracle performance query

Hi folks,
A question about Oracle performance.
Which query would be faster....Is it the join of the tables or Is it the sub query of the tables.
ex : select A.* from A a, B b where a.col1 = b.col1;
(OR)
select * from A where col1 in (select col1 from B);
Thanks
Shekar.

the query are not equivalent!
SQL> select * from dept where deptno in (select deptno from emp)
    DEPTNO DNAME          LOC
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        10 ACCOUNTING     NEW YORK
SQL> select dept.* from dept,emp where dept.deptno=emp.deptno;
    DEPTNO DNAME          LOC
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        30 SALES          CHICAGO
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        30 SALES          CHICAGO
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        10 ACCOUNTING     NEW YORK
        30 SALES          CHICAGO
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        20 RESEARCH       DALLAS
        10 ACCOUNTING     NEW YORK
14 rows selected.

Similar Messages

  • Frm-40505:ORACLE error: unable to perform query in oracle forms 10g

    Hi,
    I get error frm-40505:ORACLE error: unable to perform query on oracle form in 10g environment, but the same form works properly in 6i.
    Please let me know what do i need to do to correct this problem.
    Regards,
    Priya

    Hi everyone,
    I have block created on view V_LE_USID_1L (which gives the error frm-40505) . We don't need any updation on this block, so the property 'updateallowed' is set to 'NO'.
    To fix this error I modified 'Keymode' property, set it to 'updatable' from 'automatic'. This change solved the problem with frm-40505 but it leads one more problem.
    The datablock v_le_usid_1l allows user to enter the text (i.e. updated the field), when the data is saved, no message is shown. When the data is refreshed on the screen, the change done previously on the block will not be seen (this is because the block updateallowed is set to NO), how do we stop the fields of the block being editable?
    We don't want to go ahead with this solution as, we might find several similar screens nad its diff to modify each one of them individually. When they work properly in 6i, what it doesn't in 10g? does it require any registry setting?
    Regards,
    Priya

  • FRM-40505  Oracle Error: Unable to perform query(URGENT)

    Hi I developed a form with a control_block and table_block(based on table)
    in same Canvas.
    Based on values on control_block and pressing Find button detail block will be queried.
    Control_block ->
    textitem name "payment_type" char type
    text item name "class_code " char type
    push button "find"
    base table: --> payment_terms(termid,payment_type,class_code,other colums)
    table_block is based on above table
    Now I have written when-button-pressed trigger on find button..
    declare
    l_search varchar2(100);     
    BEGIN
    l_search := 'payment_type='|| :control_block .payment_type||' AND class_code='||:control_block .class_code ;
    SET_BLOCK_PROPERTY('table_block',DEFAULT_WHERE,l_search);
    go_block('table_block');
    EXECUTE_QUERY;
    EXCEPTION
         when others then
         null;
    END;
    I am getting
    FRM-40505 Oracle Error: Unable to perform query
    please help..

    You don't need to build the default_where at run time. Just hard-code the WHERE Clause property as:
        column_x = :PARAMETER.X
    But, if for some compelling reason, you MUST do it at run time this should work:
        Set_block_property('MYBLOCK',Default_where,
            'COLUMN_X=:PARAMETER.X');
    Note that there are NO quotes except for first and last. If you get some sort of error when you query, you should actually see :Parameter.X replaced with :1 when you do Help, Display Error.

  • Oracle performance, slow for larger and more complex results.

    Hello Oracle forum,
    At the moment i have a Oracle database running and i'm specifically interested in the efficiency spatial extension for webmaps and GIS.
    I've been testing the database with large shape files (400mb - 1gigabyte) loaded them into the database with shp2sdo->sql*loader.
    Using Benchmark factory i've test the speed of transactions an these drop relatively quickly. I've started with a simple query:
    SELECT id FROM map WHERE id = 3 when I increase the amount of id's to 3-10000 the performance decreases drastically.
    so :
    SELECT id FROM map WHERE id >=3 and id <= 10000
    The explain plan shows the second query , both query's use the index.
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 9828 | 49140 | 22 (0)| 00:00:01 |
    |* 1 | INDEX RANGE SCAN| SYS_C009650 | 9828 | 49140 | 22 (0)| 00:00:01 |
    Statistics
    0 recursive calls
    0 db block gets
    675 consistent gets
    0 physical reads
    0 redo size
    134248 bytes sent via SQL*Net to client
    7599 bytes received via SQL*Net from client
    655 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    9796 rows processed
    The statistics does not show very weird stuff, but maybe i'm wrong. Nothing changed in the explain plan except for the range scan instead of a unique scan.
    The query returns lots of results and this is I think the reason why my measured time of the query is large. The time it takes returning large amount of rows increases quickly for more rows.
    . Can this be solved? The table has been analyzed before starting the query.
    The parameters of the database are not really changed from standard, I increased the amount of memory used by Oracle 11g to 1+ gigabyte.
    and let the database itself decide how it uses this memory.
    The system specs are and db_parameters are:
    Oracle 11G
    Memory Processor # of CPUs OS OS Version OS B
    1.99 gb Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz 2 Microsoft WindowsXP 5.2600
    0=Oracle decides which value will be given
    cursor_sharing EXACT
    cursor_space_for_time FALSE
    db_block_size 8192
    db_recovery_file_dest_size 2147483648
    diagnostic_dest C:\DBBENCHMARK\ORACLE
    dispatchers (PROTOCOL=TCP) (SERVICE=gistestXDB)
    hash_area_size 131072
    log_buffer 5656576
    memory_max_target 1115684864
    memory_target 1048576000
    open_cursors 300
    parallel_max_servers 20
    pga_aggregate_target 0
    processes 150
    resumable_timeout 2162688
    sort_area_size 65536
    Sga=632mb
    PGA=368mb
    javapool=16mb
    largepool=8mb
    other=8mb
    So I indexed and analyzed the data what did i forget? I can speed it up with soft parsing, but the problem remains . Hopefully this enough information for some analysis, does anyone experienced the same problems ? I tested with SQLdeveloper the speed and is shows the same speed as Benchmark factory. What could be wrong with the parameters?
    Thanks,
    Jan Martijn
    Edited by: user12227964 on 25-jan-2010 4:53
    Edited by: user12227964 on 26-jan-2010 2:20

    Sand wrote:
    select count(id) , resulted in 3669015 counted id's.
    The database counted 18,345,075 rows per second without binded variables , which is ten times slower as your result. This can be possible because of hardware but my question is specifically about the number of rows returned thus large amount of results. The idea was not to compare the speed of "+select count(*)+" statements - but to illustrate that even when dealing with a huge number of rows, one can decrease the amount of I/O that needs to be performed to deal with that number of rows.
    Select id from map where id <= 1
    4000 rows per second are selected, Rows/sec is a meaningless measurement - due to physical I/O (PIO) versus logical I/O (LIO). You can select a 100 rows and these require PIO. Resulting in an elapsed time of 1 sec. You can select a 1000 rows that require only LIO. With an an elapsed time of 0.5 sec.
    Is the 2nd method better or faster? No. It simply needed less time to be spend on I/O as the data blocks were in the buffer cache (memory) and did not require very slow and expensive disk access.
    Another database i testes returns 6 times 25425 rows back per second for the same query (100 ids). What could be a parameter that limits the output speed of multiple rows in a query?.Every single row that needs to be read/processed by a SQL statement has a cost associated with it. This cost is not consistent! It differs depending on how that row can reached - what I/O paths are available to find that rows? Does the full table need to be scanned? Does an index need to be scanned? Is there a unique index that can be used? Is the table partitioned and can partitioning pruning be applied and local partition indexes used? Are there are user functions that need to be applied to the row's data? Etc. Etc.
    All these together determine how fast the client gets a row from the cursor executing that SQL.
    The more rows you want to process, the bigger the increase in the cost/expense - specifically more I/O. As I/O is the biggest expense (slowest ito elapsed time).
    So you want to do as little I/O as possible and read as little data as possible. For example, instead of a full table scan, a fast full index scan. For example, instead of reading the complete contents of a 10GB table, reading the complete contents of a 12MB index for that table.
    I suggest that you read the Oracle Performance Guide to familiarise yourself with basic performance concepts. Use http://tahiti.oracle.com for finding the the guide for your applicable Oracle version.

  • UPDATE TABLE - ORACLE performance

    Hi,
    I have table with many columns, and i want to update it :
    *1)- *
    update table T
    set col1=val1,
    col2=val2
    where c1;
    *2)-*
    update table T
    set col1=val1
    where c1;
    update table T
    set col1=val1
    where c1;
    Any one know : How is bettre for the oracle performance the first statement or the second?and WHY?
    My table is a huge table with many column, i need know the best query in ordre to dont disturb the oracle performance
    Thanks

    Yes, Your guess is right. You can test it with a small test case in your test environment. I have tested it in my environment. see the result below. Also wait for other experts to comment.
    SQL> create table test_emp (ename varchar2(50),empno number primary key, sal number);
    Table created.
    SQL> insert into test_emp select object_name,object_id,dbms_random.value(1000,100000) from all_objects;
    42502 rows created.
    SQL> commit;
    Commit complete.
    SQL> exec dbms_stats.gather_table_stats(USER,'TEST_EMP',cascade=>true);
    PL/SQL procedure successfully completed.
    SQL> explain plan for
      2  UPDATE test_emp
      3  SET ename=INITCAP(ename), sal=sal+20
      4  WHERE empno>1500;
    Explained.
    SQL> select * from xplan;
    PLAN_TABLE_OUTPUT
    Plan hash value: 1067865627
    | Id  | Operation        | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | UPDATE STATEMENT   |           | 41551 |  2110K|    85     (3)| 00:00:02 |
    |   1 |  UPDATE         | TEST_EMP |       |       |         |           |
    |*  2 |   TABLE ACCESS FULL| TEST_EMP | 41551 |  2110K|    85     (3)| 00:00:02 |
    Query Block Name / Object Alias (identified by operation id):
    PLAN_TABLE_OUTPUT
       1 - UPD$1
       2 - UPD$1 / TEST_EMP@UPD$1
    Predicate Information (identified by operation id):
       2 - filter("EMPNO">1500)
    Column Projection Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       2 - (upd=2,4; cmp=3) "TEST_EMP".ROWID[ROWID,10],
           "ENAME"[VARCHAR2,50], "EMPNO"[NUMBER,22], "SAL"[NUMBER,22]
    26 rows selected.
    SQL> explain plan for
      2  UPDATE test_emp
      3  SET ename=INITCAP(ename)
      4  WHERE empno>1500;
    Explained.
    SQL> select * from xplan;
    PLAN_TABLE_OUTPUT
    Plan hash value: 1067865627
    | Id  | Operation        | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | UPDATE STATEMENT   |           | 41551 |  1257K|    85     (3)| 00:00:02 |
    |   1 |  UPDATE         | TEST_EMP |       |       |         |           |
    |*  2 |   TABLE ACCESS FULL| TEST_EMP | 41551 |  1257K|    85     (3)| 00:00:02 |
    Query Block Name / Object Alias (identified by operation id):
    PLAN_TABLE_OUTPUT
       1 - UPD$1
       2 - UPD$1 / TEST_EMP@UPD$1
    Predicate Information (identified by operation id):
       2 - filter("EMPNO">1500)
    Column Projection Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       2 - (upd=2; cmp=3) "TEST_EMP".ROWID[ROWID,10], "ENAME"[VARCHAR2,50],
           "EMPNO"[NUMBER,22]
    26 rows selected.
    SQL> exlain plan for
    SP2-0734: unknown command beginning "exlain pla..." - rest of line ignored.
    SQL> explain plan for
      2  UPDATE test_emp
      3  SET sal=sal+20
      4  WHERE empno>1500;
    Explained.
    SQL> select * from xplan;
    PLAN_TABLE_OUTPUT
    Plan hash value: 1067865627
    | Id  | Operation        | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | UPDATE STATEMENT   |           | 41551 |  1095K|    85     (3)| 00:00:02 |
    |   1 |  UPDATE         | TEST_EMP |       |       |         |           |
    |*  2 |   TABLE ACCESS FULL| TEST_EMP | 41551 |  1095K|    85     (3)| 00:00:02 |
    Query Block Name / Object Alias (identified by operation id):
    PLAN_TABLE_OUTPUT
       1 - UPD$1
       2 - UPD$1 / TEST_EMP@UPD$1
    Predicate Information (identified by operation id):
       2 - filter("EMPNO">1500)
    Column Projection Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       2 - (upd=3; cmp=2) "TEST_EMP".ROWID[ROWID,10], "EMPNO"[NUMBER,22],
           "SAL"[NUMBER,22]
    26 rows selected.
    SQL>

  • Oracle Performance Issue

    Hardware Configuration:
    Regarding Oracle Performance Issue.
    Configuration 1
    ================
    SunV880 - Sunfire
    32 GB RAM
    14 numbers of 36GB hard disk
    8 CPUs
    CPU Speed 750MZ.
    Software Configuration:
    Oracle 8i
    OS version - Solaris 8
    Customized our own application - Namex
    Configuration 2
    ================
    Intel PIII - 750 MZ
    2 GB RAM
    2 CPUS
    Software configuration
    Oracle 8i
    OS version linux 6.2
    Customized our own application - Namex (multi threaded application)
    We installed the oracle application in all hard disks. All tables
    are splited in to separate hard disks.
    OS installed in 1 hard disk.
    namex application installed in 1 hard disk
    Oracle installed in 1 hard disk.
    All tables are splited in to other hard disks.
    We are trying to insert some user databases in oracle table. We
    achieved up to 150 records/second in Sun server. But in lower
    configuration our application inserts up to 100 records/second.
    (configuration 2)
    We want improve our inserting database records/per rate
    in Sun Server.
    How to tune our oracle application parameter values in init.ora
    file. Our application tries to insert up to 500 records per second.
    But I can't able to achieve this value.
    init.ora file
    =============
    db_name = "namex"
    instance_name = namex64
    service_names = namex64
    control_files = ("/disk1/oracle64/OraHome1/oradata/Namex64/control01.ctl", "/disk1/oracle64/OraHome1/oradata/namex64/control02.ctl", "/disk1/oracle64/OraHome1/oradata/namex64/control03.ctl")
    open_cursors = 300
    max_enabled_roles = 145
    #db_block_buffers = 20480
    db_block_buffers = 604800
    #shared_pool_size = 419430400
    shared_pool_size = 8000000000
    #log_buffer = 163840000
    log_buffer = 2147467264
    #large_pool_size = 614400
    java_pool_size = 0
    log_checkpoint_interval = 10000
    log_checkpoint_timeout = 1800
    processes = 1014
    # audit_trail = false # if you want auditing
    # timed_statistics = false # if you want timed statistics
    timed_statistics = true # if you want timed statistics
    # max_dump_file_size = 10000 # limit trace file size to 5M each
    # Uncommenting the lines below will cause automatic archiving if archiving has
    # been enabled using ALTER DATABASE ARCHIVELOG.
    # log_archive_start = true
    # log_archive_dest_1 = "location=/disk1/oracle64/OraHome1/admin/namex64/arch"
    # log_archive_format = arch_%t_%s.arc
    #DBCA uses the default database value (30) for max_rollback_segments
    #100 rollback segments (or more) may be required in the future
    #Uncomment the following entry when additional rollback segments are created and made online
    #max_rollback_segments = 500
    # If using private rollback segments, place lines of the following
    # form in each of your instance-specific init.ora files:
    #rollback_segments = ( RBS0, RBS1, RBS2, RBS3, RBS4, RBS5, RBS6, RBS7, RBS8, RBS9, RBS10, RBS11, RBS12, RBS13, RBS14, RBS15, RBS16, RBS17, RBS18, RBS19, RBS20, RBS21, RBS22, RBS23, RBS24, RBS25, RBS26, RBS27, RBS28 )
    # Global Naming -- enforce that a dblink has same name as the db it connects to
    # global_names = false
    # Uncomment the following line if you wish to enable the Oracle Trace product
    # to trace server activity. This enables scheduling of server collections
    # from the Oracle Enterprise Manager Console.
    # Also, if the oracle_trace_collection_name parameter is non-null,
    # every session will write to the named collection, as well as enabling you
    # to schedule future collections from the console.
    # oracle_trace_enable = true
    # define directories to store trace and alert files
    background_dump_dest = /disk1/oracle64/OraHome1/admin/Namex64/bdump
    core_dump_dest = /disk1/oracle64/OraHome1/admin/Namex64/cdump
    #Uncomment this parameter to enable resource management for your database.
    #The SYSTEM_PLAN is provided by default with the database.
    #Change the plan name if you have created your own resource plan.# resource_manager_plan = system_plan
    user_dump_dest = /disk1/oracle64/OraHome1/admin/Namex64/udump
    db_block_size = 16384
    remote_login_passwordfile = exclusive
    os_authent_prefix = ""
    compatible = "8.0.5"
    #sort_area_size = 65536
    sort_area_size = 1024000000
    sort_area_retained_size = 65536
    DB_WRITER_PROCESSES=4
    How to improve my performance activities on Oracle server.
    Please guide me regarding this issue.
    If anyone wants more info, please let me know.
    Best regards,
    Senthilkumar

    Are you sure that it is not an application constraint ? i.e. the application can't handle so much data per second ? (application locks, threads )
    Have you tried to write a simple test program, which inserts predefined data (which your application inserts) the same data, only changing keys ?
    Then comparing the values from the 1st and the 2nd configuration ?
    Did you check the way your application is communicating with oracle ? If it is TCP/ip (even on the local machine) then this is your main problem.
    And one more thing, do you know if your application is able to run the load (inserts) of data on different threads (i.e. in parallel), because if is not, you won't be able to push the speed higher because your constraint is the speed of a single CPU. Consider running several process, which loads the data.
    We had the same problem ot AIX machines with 4 cpus. Monitoring the machine, we found that only 25% (1 cpu) where in use. We had to run 4 processes to push the speed up. Check your system's overal load while running the 'load' (inserts).
    log_checkpoint_interval = 10000
    Check if this value is appropriate. Maybe you should set it to 0 (infinite). This will disable checkpoints on a 'number of undo record' basis. Checpoints will occure only on log switch.
    How much redo files per redo groups do you have ? What is their size ? Are they on different disks ? How much redo data is generated by a single 'record' inserted ?
    Hope i helped at least a little.

  • Oracle Performance Management doubts

    Hi All,
    I have some questions related to Oracle performance management and hope they will get answered over here:-
    Que1. The weight of all objective should be 100 but in my case it is allowing any value. What I need to do to restrict it?
    Que2. Can we do objective setting and Appraisal process simultaneously? That would be allocate objective and rating in parallel?
    Que3. When and how the rating provided by manager would reflect in the Performance (People --> Assignment --> other --> Performance) widow and what would be the effective date. I have completed all setup and process but the final rating is still not available.
    Que4. What is difference between Talent management, Performance management and Workforce performance Management?
    Que5. When I include the Appraisal in the PMP and select the Appraisal template (that just has final rating) and click on the "Go to Task" against "Manage appraisals" (to initiate it) I do not see anything. Do we/manager need to create plan every time using the link Appraisal.
    Sorry for asking too many questions.
    Thanks,
    Avinash

    Que1. The weight of all objective should be 100 but in my case it is allowing any value. What I need to do to restrict it?
    ANS : This is a seeded one. If you want to restrict it you have to customize the page.
    Que2. Can we do objective setting and Appraisal process simultaneously? That would be allocate objective and rating in parallel?
    ANS : There is a checkbox "Allow Objective Setting outside of the period" (something like that).
    Que4. What is difference between Talent management, Performance management and Workforce performance Management?
    ANS: AFAIK, Oracle Talent Management and Oracle Performance Management are same. Prior to Oracle Performance Management, the module name was Oracle Talent Management.
    Que5. When I include the Appraisal in the PMP and select the Appraisal template (that just has final rating) and click on the "Go to Task" against "Manage appraisals" (to initiate it) I do not see anything. Do we/manager need to create plan every time using the link Appraisal.
    ANS : You can schedule the concurrent program, "Mass Appraisal Creation".
    Hope it helps!.
    MAK

  • Oracle Text query: Escaping characters and specifying progression sequences

    How can I combine the escaping of a search string and the specification of progression sequences within an oracle text query
    so that in all cases the correct results are delivered (see example below)?
    The scenario in which to use this is the following:
    + Database: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0
    + Requirement: Hitlist of results ordered by score whereby the different part within
    the result list are specified using progression sequences within oracle text query
    Example:
    create table service_provider (
    id number,
    name_c varchar(100),
    uri_c varchar(255)
    insert into service_provider values (1,'ABB Company Mgmt','http://www.abb-company-mgmt.de');
    insert into service_provider values (2,'Dr. Abbas Ming','http://www.dr-abbas-ming.de');
    insert into service_provider values (3,'SABBATA United','http://www.sabbata-united.de');
    insert into service_provider values (4,'ABB','http://www.abb.de');
    insert into service_provider values (5,'AND Company Mgmt','http://www.and-company-mgmt.de');
    insert into service_provider values (6,'Dr. Andas Ming','http://www.dr-andas-ming.de');
    insert into service_provider values (7,'SANDATA United','http://www.sandata-united.de');
    insert into service_provider values (8,'AND','http://www.and.de');
    Query 1: works correctly in this case
    select * from (
    select /*+ FIRST_ROWS */ score(1), this_.*
    from service_provider this_
    where
    CONTAINS ( this_.NAME_C , '<QUERY><textquery grammar="CONTEXT">' ||
    '<progression>' ||
    '<seq>abb</seq>' ||
    '<seq>abb%</seq>' ||
    '<seq>%abb%</seq>' ||
    '<seq>fuzzy(abb,1,100,WEIGHT)</seq>' ||
    '</progression></textquery></QUERY>', 1 ) > 0
    order by score(1) desc, this_.NAME_C
    ) where rownum < 21
    delivers
    76     4     ABB     http://www.abb.de
    76     1     ABB Company Mgmt     http://www.abb-company-mgmt.de
    51     2     Dr. Abbas Ming     http://www.dr-abbas-ming.de
    26     3     SABBATA United     http://www.sabbata-united.de
    Query 2: procudes error
    select * from (
    select /*+ FIRST_ROWS */ score(1), this_.*
    from service_provider this_
    where
    CONTAINS ( this_.NAME_C , '<QUERY><textquery grammar="CONTEXT">' ||
    '<progression>' ||
    '<seq>and</seq>' ||
    '<seq>and%</seq>' ||
    '<seq>%and%</seq>' ||
    '<seq>fuzzy(and,1,100,WEIGHT)</seq>' ||
    '</progression></textquery></QUERY>', 1 ) > 0
    order by score(1) desc, this_.NAME_C
    ) where rownum < 21
    produces ORA-29902, ORA-20000, DRG-50901 because AND is a reserved word in oracle text
    So we need escaping ...
    Query 3: does not work correctly
    select * from (
    select /*+ FIRST_ROWS */ score(1), this_.*
    from service_provider this_
    where
    CONTAINS ( this_.NAME_C , '<QUERY><textquery grammar="CONTEXT">' ||
    '<progression>' ||
    '<seq>{abb}</seq>' ||
    '<seq>{abb%}</seq>' ||
    '<seq>{%abb%}</seq>' ||
    '<seq>fuzzy({abb},1,100,WEIGHT)</seq>' ||
    '</progression></textquery></QUERY>', 1 ) > 0
    order by score(1) desc, this_.NAME_C
    ) where rownum < 21
    delivers
    76     4     ABB     http://www.abb.de
    76     1     ABB Company Mgmt     http://www.abb-company-mgmt.de
    Query 4: does not produce an error, but also does not work correctly
    select * from (
    select /*+ FIRST_ROWS */ score(1), this_.*
    from service_provider this_
    where
    CONTAINS ( this_.NAME_C , '<QUERY><textquery grammar="CONTEXT">' ||
    '<progression>' ||
    '<seq>{and}</seq>' ||
    '<seq>{and%}</seq>' ||
    '<seq>{%and%}</seq>' ||
    '<seq>fuzzy({and},1,100,WEIGHT)</seq>' ||
    '</progression></textquery></QUERY>', 1 ) > 0
    order by score(1) desc, this_.NAME_C
    ) where rownum < 21
    delivers
    76     8     AND     http://www.and.de
    76     5     AND Company Mgmt     http://www.and-company-mgmt.de

    Anywhere that you just use the word by itself, enclose it in {}, but anywhere that you add % on either side or both don't enclose it in {}. Please see the demonstration below.
    SCOTT@10gXE> SELECT * FROM v$version
      2  /
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SCOTT@10gXE> create table service_provider
      2    (id     number,
      3       name_c     varchar(100),
      4       uri_c     varchar(255))
      5  /
    Table created.
    SCOTT@10gXE> insert all
      2  into service_provider values (1,'ABB Company Mgmt','http://www.abb-company-mgmt.de')
      3  into service_provider values (2,'Dr. Abbas Ming','http://www.dr-abbas-ming.de')
      4  into service_provider values (3,'SABBATA United','http://www.sabbata-united.de')
      5  into service_provider values (4,'ABB','http://www.abb.de')
      6  into service_provider values (5,'AND Company Mgmt','http://www.and-company-mgmt.de')
      7  into service_provider values (6,'Dr. Andas Ming','http://www.dr-andas-ming.de')
      8  into service_provider values (7,'SANDATA United','http://www.sandata-united.de')
      9  into service_provider values (8,'AND','http://www.and.de')
    10  into service_provider values (9,'EBB','fuzzy test')
    11  into service_provider values (10,'OND','fuzzy test')
    12  select * from dual
    13  /
    10 rows created.
    SCOTT@10gXE> CREATE INDEX your_index
      2  ON service_provider (name_c)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  PARAMETERS ('STOPLIST CTXSYS.EMPTY_STOPLIST')
      5  /
    Index created.
    SCOTT@10gXE> VARIABLE search_string VARCHAR2 (100)
    SCOTT@10gXE> EXEC :search_string := 'abb'
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> COLUMN name_c FORMAT A20 WORD_WRAPPED
    SCOTT@10gXE> COLUMN uri_c  FORMAT A40
    SCOTT@10gXE> select *
      2  from   (select /*+ FIRST_ROWS */ score(1), this_.*
      3            from   service_provider this_
      4            where  CONTAINS
      5                  (this_.NAME_C ,
      6                   '<QUERY>
      7                   <textquery grammar="CONTEXT">
      8                     <progression>
      9                       <seq>{'         || :search_string || '}</seq>
    10                       <seq>'         || :search_string || '%</seq>
    11                       <seq>%'         || :search_string || '%</seq>
    12                       <seq>fuzzy({' || :search_string || '},1,100,WEIGHT)</seq>
    13                     </progression>
    14                  </textquery>
    15                   </QUERY>', 1 ) > 0
    16            order  by score(1) desc, this_.NAME_C)
    17  where  rownum < 21
    18  /
      SCORE(1)         ID NAME_C               URI_C
            76          4 ABB                  http://www.abb.de
            76          1 ABB Company Mgmt     http://www.abb-company-mgmt.de
            51          2 Dr. Abbas Ming       http://www.dr-abbas-ming.de
            26          3 SABBATA United       http://www.sabbata-united.de
             4          9 EBB                  fuzzy test
    SCOTT@10gXE> EXEC :search_string := 'and'
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> /
      SCORE(1)         ID NAME_C               URI_C
            76          8 AND                  http://www.and.de
            76          5 AND Company Mgmt     http://www.and-company-mgmt.de
            51          6 Dr. Andas Ming       http://www.dr-andas-ming.de
            26          7 SANDATA United       http://www.sandata-united.de
             5         10 OND                  fuzzy test
    SCOTT@10gXE>

  • Converting Oracle XML Query Result in Java String by using XSU

    Hi,
    I have a problem by converting Oracle XML Query Result in Java
    String by using XSU. I use XSU for Java.
    For example:
    String datum=new OracleXMLQuery(conn,"Select max(ps.datum) from
    preise ps where match='"+args[0]+"'");
    String datum1=datum;
    I become the following error:
    Prototyp.java:47: Incompatible type for declaration. Can't
    convert oracle.xml.sql.query.OracleXMLQuery to java.lang.String.
    Can somebody tell me a method() for converting to solve my
    problem??????
    Thanks

    Hmmm.. Pretty basic just look at the example:
    OracleXMLQuery qry = new OracleXMLQuery(conn,"Select max(ps.datum) from preise ps where match='"+args[0]+"'");
    String xmlString = qry.getXMLString();
    Hi,
    I have a problem by converting Oracle XML Query Result in Java
    String by using XSU. I use XSU for Java.
    For example:
    String datum=new OracleXMLQuery(conn,"Select max(ps.datum) from
    preise ps where match='"+args[0]+"'");
    String datum1=datum;
    I become the following error:
    Prototyp.java:47: Incompatible type for declaration. Can't
    convert oracle.xml.sql.query.OracleXMLQuery to java.lang.String.
    Can somebody tell me a method() for converting to solve my
    problem??????
    Thanks

  • Oracle text query

    Hi,
    I have a View object with various attributes (eg, name1, name2, name3, address1, address2, address3 etc). A query/table component based on this view object works just fine. However, I wish to replace name1, name2, name3 and other attributes in the query with just 'name'. These attributes are still to be shown in the result table. This new 'name' attribute will be used in an Oracle Text query clause, instead of individual searches on each attribute.
    My plan was to simply make the various name1, name2 etc attributes non-'queryable' in the View def to hide them from the query. Then I'd add a transient 'name' attribute. My hope was, that I could override the getWhereClause() in the ViewObjectImpl and simply tack on the oracle text clause to the WHERE (example below):
    WHERE CONTAINS (
    SOMECOLUMN,
                '<query>
       <textquery lang="ENGLISH" grammar="CONTEXT">TRANSIENT_ATTR_VALUE
    ..... Oracle Text query grammar stuff here ....  </query>') > 0How do I access the transient value in the ViewObjectImpl to add the above SQL? Or am I going about this in completely the wrong way?
    thanks,
    Barry.

    Based on what I found in
    http://www.oracle.com/technology/oramag/oracle/09-nov/o69frame.html?_template=/ocom/print
    and
    http://blogs.oracle.com/smuenchadf/examples/
    136.     Introducing a Checkbox to Toggle a Custom SQL Predicate on an LOV's Search Form. [11.1.1.0.0] 19-NOV-2008
    I have the following implementation, which seems to work. Does anyone see any problems with this?
    With regard to SQL injection, does ViewCriteriaItem sanitise the 'val' from the query, or should I do that manually here myself?
        @Override
        public java.lang.String getCriteriaItemClause(ViewCriteriaItem vci) {
            if ("OraTextTransientAttrib".equals(vci.getAttributeDef().getName())) {
                if (vci.getViewCriteria().isCriteriaForQuery()) {
                    String val = (String)vci.getValue();
                    logger.debug("Doing oracle text name search on '" + val + "'");
                    // simplified version of my oracle text query
                    return "CONTAINS ('<query>..... " + val + "....</query>') > 0 ";
                } else {
                    // SQL predicate for no changes to the results
                    // spaces needed if you have several of these blocks
                    return " 1=1 ";
            // other blocks for other similar oracle text attribs
            return super.getCriteriaItemClause(vci);
        }

  • Oracle Performance Manager error VTM-0002

    Hi,
    when i am trying to display charts using Oracle Performance Manager it's throwing errors like
    VTM-0002: Error displaying chart CPU Breakdown
    ODG-05185: Error: message decode:
    VP_START_COLLECT_REQ: vppcallbb failed
    can any one help?

    i feel it's a configuration problem not a oracle bug. and who wants pin those oracle guys ; )
    any guess from you ppl ?
    I am using Oracle 9.0.1.0.1 in windows, connecting to the server from remote system.

  • Is there any certification for oracle performance tuning..?

    Hi All,
    Do we have any certification for oracle performance tuning.
    Let me know if it is.
    Thanks,
    Ritesh

    See http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=287
    HTH
    Srini

  • Oracle Performance(Talent) Management

    Hi all
    Can anyone please help me with a documentation link of Oracle Performance(Talent) Management? I am totally new to this module.
    Thanks in advance

    Search MetaLink for a document called Talent Management Supplement_. Metalink document id 302541.1
    This contains all the information you will need to implement Talent (Performance) Management. Well, not everything, because it won't explain all the bugs! But, I'm sure you can come back to the forum for more help.
    Regards
    Tim
    Edited by: TimW on Sep 26, 2008 4:11 PM

  • Competency Weight age- Oracle Performance Management

    Dear All,
    We are in the process of implementing Oracle Performance Management (12.1.3 Ver), these are following scenario we need to address. Kindly post your advice .
    1.     We have 4 Objective ( Objective-1, Objective-2, Objective-3 and Non-Bonus able Objective) for all the employees with weigh age. We need to restrict the weight age and the sum of all the Objective weight age should not exceed 35% . (EX: Obj 1+ Obj 2 + Obj 3+ Non-Bonus able = 35%). How to achieve this?
    2.     We have 4 Mandatory competency and for which we need to provided weight age for each competency ( Ex: Communication Skill -20% weight age & Team work – 30%) How to achieve this?
    3.     Our final rating works as, Objective Rating + Competency Rating ( Final Score = Objective Rating + Competency Rating). How to achieve this?
    4.     We have another requirement like we need to Tag Absenteeism Rating ( Please see the below rating scale) along with the Final Appraisal rating . I am furnishing the Rating details
    Excel----------Never Absent and always punctual.
    Achieved----Never absent but late in or early out with prior permission.
    Partial ------ Deduction of 5%     Few Absent or late in or early out without prior permission or advance intimation.
    Not Achieved ----- Deduction of 10%     Multiple Absent or late in or early out with no permission at all.
    Please let me know if you need more information
    Thanks and Regards
    Suresh Subramaniyam

    Que1. The weight of all objective should be 100 but in my case it is allowing any value. What I need to do to restrict it?
    ANS : This is a seeded one. If you want to restrict it you have to customize the page.
    Que2. Can we do objective setting and Appraisal process simultaneously? That would be allocate objective and rating in parallel?
    ANS : There is a checkbox "Allow Objective Setting outside of the period" (something like that).
    Que4. What is difference between Talent management, Performance management and Workforce performance Management?
    ANS: AFAIK, Oracle Talent Management and Oracle Performance Management are same. Prior to Oracle Performance Management, the module name was Oracle Talent Management.
    Que5. When I include the Appraisal in the PMP and select the Appraisal template (that just has final rating) and click on the "Go to Task" against "Manage appraisals" (to initiate it) I do not see anything. Do we/manager need to create plan every time using the link Appraisal.
    ANS : You can schedule the concurrent program, "Mass Appraisal Creation".
    Hope it helps!.
    MAK

  • Oracle performance against other DBMS

    Hi,
    I would like to ask for some advice about Oracle overal performance, comparing with other databases. I was using MySQL and MS SQL. MySQL is quite fast for me, but it does not supper stored procedures and relationship. MS SQL is too slow and it is from MS as well. Was there are research or comparing?

    Que1. The weight of all objective should be 100 but in my case it is allowing any value. What I need to do to restrict it?
    ANS : This is a seeded one. If you want to restrict it you have to customize the page.
    Que2. Can we do objective setting and Appraisal process simultaneously? That would be allocate objective and rating in parallel?
    ANS : There is a checkbox "Allow Objective Setting outside of the period" (something like that).
    Que4. What is difference between Talent management, Performance management and Workforce performance Management?
    ANS: AFAIK, Oracle Talent Management and Oracle Performance Management are same. Prior to Oracle Performance Management, the module name was Oracle Talent Management.
    Que5. When I include the Appraisal in the PMP and select the Appraisal template (that just has final rating) and click on the "Go to Task" against "Manage appraisals" (to initiate it) I do not see anything. Do we/manager need to create plan every time using the link Appraisal.
    ANS : You can schedule the concurrent program, "Mass Appraisal Creation".
    Hope it helps!.
    MAK

Maybe you are looking for