Improving performance with IN clause

We use lot of those IN clauses for good or bad, and I am trying to improve the performance of those IN clauses.
I have looked at the documentation several times and can't seem to find a way to bind the values in a 'IN' clause. Is there any thing else that can be done to improve the IN clause performance in OCI?
Thanks a lot

Hi,
You can refer to the following URL on asktom website for detailed explanation about IN & Exists
http://asktom.oracle.com/pls/ask/f?p=4950:8:3465613697817080707::NO::F4950_P8_DISPLAYID,F4950_P8_B:953229842074,Y
HTH
Cheers,
Giridhar Kodakalla

Similar Messages

  • Improve Performance with QaaWS with multiple RefreshButtons??

    HI,
    I read, that a connection opens maximal 2 QaaWS. I want to improve Performance.
    Currently I tried to refresh 6 connections with one Button. Would it improve performance if I split this 1 Button with 6 Connections to 3 buttons each 2 connections ?
    Thanks,
    BWBW

    Hi
    HTTP 1.1 limits the number of concurrent HTTP requests to maximum two, so your dashboard will actually be able to send & receive maximum 2 request simultaneously, third will stand-by till one of those first two is handled.
    QaaWS performance is mostly affected by database performance, so if you plan to move to LO to improve performance, I'd recommend you use LO from WebI parts, as if you use LO to consume a universe query, you will experience similar performance limitations.
    If you actually want to consume WebI report parts, and need report filters, you can also consider XI 3.1 SP2 BI Services, where performance is better than QaaWS, and interactions are also easier to implement.
    Hope that helps,
    David.

  • Multiple log groups per thread to improve performance with high redo writes

    I am reading Pro Oracle 10g RAC on Linux (good book). On p.35 the authors state that they recommend 3-5 redo log groups per thread if there is a "large" amount of redo.
    Who does having more redo log groups improve performance? Does oracle paralelize the writes?

    redo logs are configured per instance, from experience you need atleast 3 redo log groups per thread to help switch over and sufficient time for archives to complete before reuse of the first redo log group. When you have a large redo log activity there is a potential that redo log groups will switch more often and it is important that archive has completed before an exisiting redo log group can be reused, else the database /instance may hang.
    I think that is what the author is referencing here, have sufficient redo log groups (based on the acitivty of your environment) to allow switching and allowing sufficient time for archives to complete.

  • Improve performance with union all

    Hello there,
    Oracle Database 11g Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    SQL> show parameter optimizer
    ORA-00942: Tabel of view bestaat niet. (Does not exist)I have the following query using the following input variables
    - id
    - startdate
    - enddate
    The query has the following format
    - assume that the number of columns are the same
    - t1 != t3 and t2 != t4
    select ct.*
    from
      select t1.*
      from   tabel1 t1
        join tabel2 t2
          on t2.key = t1.key
      union all
      select t3.*
      from   tabel3 t3
        join tabel4 t4
          on t4.key = t3.key
    where ct.id = :id
      and ct.date >= :startdate
      and ct.date < :enddate
    order by ct.dateIt is performing really slow, after the first read it performs fast.
    I tried the following thing, which was actually even slower!
    with t1c as
    select t1.*
      from   tabel1 t1
        join tabel2 t2
          on t2.key = t1.key
    where t1.id = :id
      and t1.date >= :startdate
      and t1.date < :enddate
    t2c as
    select t3.*
      from   tabel3 t3
        join tabel4 t4
          on t4.key = t3.key
    where t3.id = :id
      and t3.date >= :startdate
      and t3.date < :enddate
    select ct.*
    from
      select *
      from   t1c
      union all
      select *
      from   t2c
    order by ct.dateSo in words, I have an 'union all' construction reading from different tables with matching columns 'id' and 'date'.
    How can I improve this? Can it be improved? If you do not know the answer, but maybe a suggestion, I will be happy aswell!!!
    Thanks in advance!
    Kind regards,
    Metroickha

    >
    So in words, I have an 'union all' construction reading from different tables with matching columns 'id' and 'date'.
    How can I improve this? Can it be improved? If you do not know the answer, but maybe a suggestion, I will be happy aswell!!!
    >
    If you want to improve on what Oracle is doing you first need to know 'what Oracle is doing'.
    Post the execution plans for the query that show what Oracle is doing.
    Also post the DDL for the tables and indexes and the record counts for the tables and ID/DATE predicates.

  • Complex query - improve performance with nested arrays, bulk insert....?

    Hello, I have an extremely complicated query, that has a structure similar to:
    Overall Query
    ---SubQueryA
    -------SubQueryB
    ---SubQueryB
    ---SubQueryC
    -------SubQueryA
    The subqueries themselves are slow, and having to run them multiple times is much too slow! Ideally, I would be able to run each subquery once, and then use the results. I cannot use standard oracle tables, and i would need to keep the result of the subqueries in memory.
    I was thinking I write a pl/sql script that did the subqueries at the beginning and stored the results in memory. Then in the overall query, I could loop through my results in memory, and join the results of the various subqueries to one another.
    some questions:
    -what is the best data structure to use? I've been looking around and there are nested arrays, and there's the bulk insert functionality, but I'm not sure what is the best to you
    -the advantage of the method I'm suggesting is that I only have to do each subquery once. But, when I start joining the results of the subquery to one another, will I take a performance hit? will Oracle not be able to optimize the joins?
    thanks in advance!
    Coop

    I cannot use standard oracle tablesWhat does this mean? If you have subqueries, i assume you have tables to drive them? You're in an Oracle forum, so i assume the tables are Oracle tables.
    If so, you can look into the WITH clause, it can 'cache' the query results for you and reuse them multiple times, also helpful in making large queries with many subqueries more readable.

  • Performance with MAX clause

    I have performance issue with this query. the table is huge it has 10M rows. can we achive the same result below by rewriting in some other way?
    the column px_date, px_type and px_active are indexed ,, composite index
    SELECT MAX(GP.PX_DATE) PX_DATE,
                      GP.PRICING_SECURITY_ID,
                      GP.PX_ISO_CCY
                   FROM price_today GP
                   WHERE GP.PX_DATE <= '28-SEP-07'
                   AND GP.PX_TYPE = 'PS1'
                   AND GP.PX_ACTIVE = 'A'
                   GROUP BY GP.PRICING_SECURITY_ID, GP.PX_ISO_CCY

    the column px_date, px_type and px_active are indexed
    ,, composite indextry to create another composite index with a different column oder. Check the excecution plan to see if the index is used. If not try to force usage of the index
    with a hint.
    The column order should include the most restrictive column in the first place.
    px_type, px_active, px_date
    Also possible could be to create a separte index for each column. But I wouldn't like it. Note that in 11g you can collect combined statistics for all three columns. This is not possible in previous versions and might therefore require an index hint for best performace.

  • How do I improve performance with exchange

    My corporate email is on an exchange 2010 server. Mail.app works with the server but there are a number of performance problems when sending and receiving, which are also well documented in other discussion threads. I have tried every suggested configuration but performance remains extremely poor, especially when compared to my personal IMAP accounts, and the performance I was used to in Outlook 2011 under Mountain Lion.
    Looking through my logs I see multiple entries of:
    03/12/2013 14:37:55.007 Mail[5018]: CFNetwork SSLHandshake failed (-9800)
    03/12/2013 14:37:55.008 Mail[5018]: CFNetwork SSLHandshake failed (-9800)
    03/12/2013 14:37:56.456 Mail[5018]: CFNetwork SSLHandshake failed (-9800)
    03/12/2013 14:37:56.456 Mail[5018]: CFNetwork SSLHandshake failed (-9800)
    03/12/2013 14:37:57.989 Mail[5018]: CFNetwork SSLHandshake failed (-9800)
    03/12/2013 14:37:58.143 Mail[5018]: CFNetwork SSLHandshake failed (-9800)
    03/12/2013 14:37:59.677 Mail[5018]: CFNetwork SSLHandshake failed (-9800)
    03/12/2013 14:38:00.930 Mail[5018]: CFNetwork SSLHandshake failed (-9800)
    I have installed and trusted the certificates for our exchange server and can browse to the owa front end with no certificate warnings.
    Interestingly, I don't have the same problem with reminders or calendar which are connected to the same exchange server.
    Does anyone have any ideas how to overcome this problem?

    Some additional information...
    I fired up wireshark to take a look. For all communications to our Exchange server (Mail, Calendar, Notes...) the SSL negotation includes a downgrade to TLS v1
    I notice that Mavericks CoreFoundation Networks defaults to TLS v1.2 and that BEAST mitigation leads to some problems example: https://trac.adium.im/ticket/16550
    Exchange Server 2010 is TLS v1.0 only http://support.microsoft.com/kb/2709167
    I'll do some more Wireshark investigation.

  • Improve performance with WL 9 by using WL express license

    Hi,
    <br>
    We just move to WL 9 and the development response time is quite slow compare to 8.1.
    <br>
    Does anyone think that using only the <b>WL Express 9</b> license could improve the performance since must of the features will be disabled ?
    <br>
    Thanks,
    <br>
    Ami

    Hi,
    <br>
    We just move to WL 9 and the development response time is quite slow compare to 8.1.
    <br>
    Does anyone think that using only the <b>WL Express 9</b> license could improve the performance since must of the features will be disabled ?
    <br>
    Thanks,
    <br>
    Ami

  • Improving performance with overlapping MCs?

    I'm having some performance issues in certain areas of a flash game Im making.
    Here's the situation:
    I have big movieclip containing a map that can be scrolled and scaled. There are some pannels with a bunch of MC buttons, controls, etc. on the right side of the stage. These are seperate from the map and stay in the same place.
    Everything runs fine untill the large map is  zoomed in and/or scrolled such that the right side buttons and stuff are overlapping them map. Then the framerate jumps down from a nice smooth 30 fps to about 3 fps while the map is moving. There are no issues with the map moving when they don't overlap.
    Now the thing is, is that's there's no real interaction between the buttons and the map. No transparency or anything, in fact I'm perfectly happy with the map dissapearing behind a side pannel. There are only about 3 pannels that the screen drawing routine would have to worry about, as all the buttons rest on top of the pannels, so why is my performance taking such a hit?
    (Hmmm. Actually I do have a lot of transparency, but each is on top of a solid background, and none interact with the map.)

    I did do some reading on it. I tend not to use code without understanding how it works - at least a rudimentary understanding.
    At the moment, I'm not changing anything about how the buttons look - size, rotation, placement, color, etc. This suggests that I can keep them cached starting at runtime while testing the cacheing. (Though I also tried caching them when starting the simulation, and disableing cacheing when the buttons could be used, too.)
    Basicaly, I have a game where you use the buttons to supply program commands to robots on the map. Once this is done, you run the program, and the robots execute their programing. Meaning that you can't issue new commands while they are running (and the map is moving), so the buttons are disabled. So there is no reason they would need to change in appearance. When in the 'programing' stage, the map is not moving because the sim is not running. This seems to suggest that cacheAsBitmap could be enabled at all times.
    At the moment, I've had to resort to making the _visible property of the button pannel = false during the sim stage. However, this is not an ideal solution, it's just what I've had to resort to to be able to test the workings of the game. eventually, I'll want the player to be able to see how the commands are executing while the sim is running.

  • How to Improve performance with beans and Sessions

    Instead of using so many session variables, can i use a bean object which will hold all the variables, then put that bean object in a session.
    How it will effect the performance and how abt memory, which it will consume.

    Why would you have to scope so many variables in the session? Exactly how much information do you actually need to maintain throughout an entire user visit? You may want to review your scope for variables. I have discovered that for the most part, I only need to keep most data for the life of the page that uses it.

  • Performance with dates in the where clause

    Performance with dates in the where clause
    CREATE TABLE TEST_DATA
    FNUMBER NUMBER,
    FSTRING VARCHAR2(4000 BYTE),
    FDATE DATE
    create index t_indx on test_data(fdata);
    query 1: select count(*) from TEST_DATA where trunc(fdate) = trunc(sysdate);
    query 2: select count(*) from TEST_DATA where fdate between trunc(sysdate) and trunc(SYSDATE) + .99999;
    query 3: select count(*) from TEST_DATA where fdate between to_date('21-APR-10', 'dd-MON-yy') and to_date('21-APR-10 23:59:59', 'DD-MON-YY hh24:mi:ss');
    My questions:
    1) Why isn't the index t_indx used in Execution plan 1?
    2) From the execution plan, I see that query 2 & 3 is better than query 1. I do not see any difference between execution plan 2 & 3. Which one is better?
    3) I read somewhere - "Always check the Access Predicates and Filter Predicates of Explain Plan carefully to determine which columns are contributing to a Range Scan and which columns are merely filtering the returned rows. Be sceptical if the same clause is shown in both."
    Is that true for Execution plan 2 & 3?
    3) Could some one explain what the filter & access predicate mean here?
    Thanks in advance.
    Execution Plan 1:
    SQL> select count(*) from TEST_DATA where trunc(fdate) = trunc(sysdate);
    COUNT(*)
    283
    Execution Plan
    Plan hash value: 1486387033
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 9 | 517 (20)| 00:00:07 |
    | 1 | SORT AGGREGATE | | 1 | 9 | | |
    |* 2 | TABLE ACCESS FULL| TEST_DATA | 341 | 3069 | 517 (20)| 00:00:07 |
    Predicate Information (identified by operation id):
    2 - filter(TRUNC(INTERNAL_FUNCTION("FDATE"))=TRUNC(SYSDATE@!))
    Note
    - dynamic sampling used for this statement
    Statistics
    4 recursive calls
    0 db block gets
    1610 consistent gets
    0 physical reads
    0 redo size
    412 bytes sent via SQL*Net to client
    380 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    1 rows processed
    Execution Plan 2:
    SQL> select count(*) from TEST_DATA where fdate between trunc(sysdate) and trunc(SYSDATE) + .99999;
    COUNT(*)
    283
    Execution Plan
    Plan hash value: 1687886199
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 9 | 3 (0)| 00:00:01 |
    | 1 | SORT AGGREGATE | | 1 | 9 | | |
    |* 2 | FILTER | | | | | |
    |* 3 | INDEX RANGE SCAN| T_INDX | 283 | 2547 | 3 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - filter(TRUNC(SYSDATE@!)<=TRUNC(SYSDATE@!)+.9999884259259259259259
    259259259259259259)
    3 - access("FDATE">=TRUNC(SYSDATE@!) AND
    "FDATE"<=TRUNC(SYSDATE@!)+.999988425925925925925925925925925925925
    9)
    Note
    - dynamic sampling used for this statement
    Statistics
    7 recursive calls
    0 db block gets
    76 consistent gets
    0 physical reads
    0 redo size
    412 bytes sent via SQL*Net to client
    380 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    1 rows
    Execution Plan 3:
    SQL> select count(*) from TEST_DATA where fdate between to_date('21-APR-10', 'dd-MON-yy') and to_dat
    e('21-APR-10 23:59:59', 'DD-MON-YY hh24:mi:ss');
    COUNT(*)
    283
    Execution Plan
    Plan hash value: 1687886199
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 9 | 3 (0)| 00:00:01 |
    | 1 | SORT AGGREGATE | | 1 | 9 | | |
    |* 2 | FILTER | | | | | |
    |* 3 | INDEX RANGE SCAN| T_INDX | 283 | 2547 | 3 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - filter(TO_DATE('21-APR-10','dd-MON-yy')<=TO_DATE('21-APR-10
    23:59:59','DD-MON-YY hh24:mi:ss'))
    3 - access("FDATE">=TO_DATE('21-APR-10','dd-MON-yy') AND
    "FDATE"<=TO_DATE('21-APR-10 23:59:59','DD-MON-YY hh24:mi:ss'))
    Note
    - dynamic sampling used for this statement
    Statistics
    7 recursive calls
    0 db block gets
    76 consistent gets
    0 physical reads
    0 redo size
    412 bytes sent via SQL*Net to client
    380 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    1 rows processed

    Hi,
    user10541890 wrote:
    Performance with dates in the where clause
    CREATE TABLE TEST_DATA
    FNUMBER NUMBER,
    FSTRING VARCHAR2(4000 BYTE),
    FDATE DATE
    create index t_indx on test_data(fdata);Did you mean fdat<b>e</b> (ending in e)?
    Be careful; post the code you're actually running.
    query 1: select count(*) from TEST_DATA where trunc(fdate) = trunc(sysdate);
    query 2: select count(*) from TEST_DATA where fdate between trunc(sysdate) and trunc(SYSDATE) + .99999;
    query 3: select count(*) from TEST_DATA where fdate between to_date('21-APR-10', 'dd-MON-yy') and to_date('21-APR-10 23:59:59', 'DD-MON-YY hh24:mi:ss');
    My questions:
    1) Why isn't the index t_indx used in Execution plan 1?To use an index, the indexed column must stand alone as one of the operands. If you had a function-based index on TRUNC (fdate), then it might be used in Query 1, because the left operand of = is TRUNC (fdate).
    2) From the execution plan, I see that query 2 & 3 is better than query 1. I do not see any difference between execution plan 2 & 3. Which one is better?That depends on what you mean by "better".
    If "better" means faster, you've already shown that one is about as good as the other.
    Queries 2 and 3 are doing different things. Assuming the table stays the same, Query 2 may give different results every day, but the results of Query 3 will never change.
    For clarity, I prefer:
    WHERE     fdate >= TRUNC (SYSDATE)
    AND     fdate <  TRUNC (SYSDATE) + 1(or replace SYSDATE with a TO_DATE expression, depending on the requirements).
    3) I read somewhere - "Always check the Access Predicates and Filter Predicates of Explain Plan carefully to determine which columns are contributing to a Range Scan and which columns are merely filtering the returned rows. Be sceptical if the same clause is shown in both."
    Is that true for Execution plan 2 & 3?
    3) Could some one explain what the filter & access predicate mean here?Sorry, I can't.

  • I have a MAC Pro from 2011 currently running MAC OS 10.9.5.  This weekend I cloned the MAC HD drive to a new SSD drive for improved performance.  The clone was completed successfully with no errors.  After the clone completed I successfull restarted my sy

    I have a MAC Pro from 2011 currently running MAC OS 10.9.5.  This weekend I cloned the MAC HD drive to a new SSD drive for improved performance.  The clone was completed successfully with no errors.  After the clone completed I successfully restarted my system using the SSD as the boot device.  I then successfully tested all of my products, including Photoshop CS6 and all of its plug-ins.  I successfully tested the key features that I frequently use.  Today while attempting to launch Photoshop CS6 a message is being displayed indicating that a scratch disk cannot be found.  All drives are available on the system via the Finder and Disk Utility.  I can access all drives including the old MAC HD which is no longer the boot device.  I've even attempted to launch Photoshop from the old device yet the same error persist.  Is there a way to review/edit/change Photoshop preferences if Photoshop doesn't launch?  I've even restarted my system several times to see if that would resolve the issues.  Does anyone have any recommendations for this issue?  Have you previously address this issue? 
    Thank you Gregg Williams

    Boilerplate text:
    Reset Preferences
    http://forums.adobe.com/thread/375776
    1) Close the program and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (not reversible)
    or
    2) Move the Folder. See:
    http://www.bugge.com/Family-and-friends/Illy/illy.html
    --OB

  • Improve Portal performance with BI-Java by adding additional server node.

    Hi SAP Expert
    I wonder anyone might have attempted this before,
    In an environment with BI-Java and Portal Java stack installed on the same server, is it possible to improve the system performance by adding additional portal server node? or is there any improvement seen by adding the extra server node?
    I am after suggestion and experience on how the portal performance can be improve, with consideration of BI-Java sharing Portal resources.
    Any comment will be most appreciated.

    Hi Jim,
    We've this configuration at our site, Portal and BI running together (not federated).  Recommendations would be to:
    1. Set a sensibly large max heap size on each server node of Portal (at least 2GB if not larger) and implement several nodes at least.  For example we have 4 x physical nodes, each running 3 server nodes of 2GB max heap size apiece so a total of 12 nodes.
    2. Implement the BI Safety Belt for large results sets (1127156)
    3. Implement the latest JVM / JDK you can on your environment.  We found much improved performance after implementing JDK SR10 with the J9/2.3 options enabled e.g.,  -Xjvm:j9vm23
    -Xsoftrefthreshold0
    4. Patch your BI components on the Portal (BIBASES, BIWEBAPP etc) to the latest available patch level for your Portal SP level
    5. Make sure all your RFC connections are load balanced to the backend and tuned for the kind of load you expect on your reports, and the BI is sized appropriately in terms of app servers and dialog work processes, RFC-enabled login groups in SMLG etc.
    6. Consult notes 1048691 (especially useful, opions &PROFILING=X&TRACE=X added to reports for example for performance tracing), 937697, 1021921, 948158 for information about problem analysis for this scenario
    7. Implement SAP Web Dispatcher for Portal to reduce load on static mime files
    8. Tune the Portal application.  There's plenty information on SDN related to Portal performance tuning.
    I hope this helps!
    Cheers,
    Marc

  • Improving performance of query with View

    Hi ,
    I'm working on a stored procedure where certain records have to be eleminated , unfortunately tables involved in this exception query are present in a different database which will lead to performance issue. Is there any way in SQL Server to store this query
    in a view and store it's execution plan and make it work like sp.While I beleive it's kinda crazy thought but is there any better way to improve performance of query when accessed across databases.
    Thanks,
    Vishal.

    Do not try to solve problems that you have not yet confirmed to exist.  There is no general reason why a query (regardless of whether it involves a view) that refers to a table in a different database (NB - DATABASE not INSTANCE) will perform poorly. 
    As a suggestion, write a working query using a duplicate of the table in the current database.  Once it is working, then worry about performance.  Once that is working as efficiently as it can , change the query to use the "remote" table rather
    than the duplicate. Then determine if you have an issue.  If you cannot get the level of performance you desire with a local table, then you most likely have a much larger issue to address.  In that case, perhaps you need to change your perspective
    and approach to accomplishing your goal. 

  • How to improve performance on SD document with over 1000 line items

    Dear experts,
    A lot of our SD document contains 1500 to 5000 line items. Saving a simple change of one line item description would take 5 minutes (with or without pricing considerations). We are on ECC 5.0. Does anyone know of an existing snote or ways that would help to improve performance?
    A related question on performance tracing. I have done some tracing and notice that the time to access SQL/buffer/enqueue/RFC only amount to less than 50% (sometimes 5%) of the total processing time. What has the system been doing for the "unrecorded" time?
    Thank you and appreciate!
    -cynthia

    I would check which modules or which parts of code take the most of the processing time. You can use SE30 to check one order save.
    If it's not SQL - then it may be internal processing like inefficient loops and so on.  For example runtime of nested loops with big tables have grows exponentially.
    It may be caused by SAP code - search OSS notes for based on the module names which consume most time.
    OR it can be caused by the code in your userexits - then developers have to fix it and redesign using more efficient technique.

Maybe you are looking for

  • Viewing multiple pages in .pdf form

    Hello Everytime I open a multi-page pdf in illustrator, it only opens the first page..  Why is this, and is there an option to change it? CS5 Thanks in advance, N

  • MSI 880G-E45: power on by mouse or keyboard

    Does the board support such function? Thanks!

  • Issue with creating materialized view

    Hi, We have a select query (containing joins, aggregates and UNION ALL's) using which we are creating materialized views. We were able to create these mat views in development environment, however when tried to run the same scripts in a higher enviro

  • Is there a way to install siri in Turkish without Jailbreak

    is there a way to install siri in Turkish without Jailbreak

  • What is LEFT JOIN ?

    I have gone through LEFT JOIN . Here is LEFT JOIN . Check the link http://i218.photobucket.com/albums/cc298/curseofgoldendragon/test-3.png I have a doubt here. I see we are picking all the records from Table A ...so, I dont think we need to join here