Query About performance tuning

Hi Guru's
May be this question is stupid one, but i think this is the forum where every user get details of all there questions.
I want to start learning Performance tuning but not know the path from where to start can anyone suggest me the same.
Thanks in advance

Hi,
performance tuning is a huge area. It involves following skills:
1. Understanding how Oracle stores data (physical structure of tables and indexes) and how it reads and writes it.
2. Understanding how Oracle processes and executes queries
3. Ability to read execution plans (not just scan them for 'red flags')
4. Familiarity is most common wait events, knowing and understanding Oracle Wait Interface and its limitations
5. Ability to understand AWR and ASH data and its limitations
6. Understanding Oracle optimizer and it's inputs, knowing basic formulas for cardinality and selectivity, cardinality feedback tuning
7. Abilty to read trace files (first of all extended SQL trace, 10046, and CBO trace, 10053)
8. Understanding concurrency and read consistency and work Oracle does to maintain them.
This is probably not a complete list. Of course you won't be able to learn everything at once. You can start by reading:
1. The official Oracle Performance Tuning Guide
2. T. Kyte's books on Oracle architecture
3. Milsap's and Holt's book "Optimizing Oracle Performance"
4. J. Lewis "Cost based fundamentals"
Best regards,
Nikolay

Similar Messages

  • Looking for book about performance tuning 11g database

    Hi,
    I am looking for books about performance tuning oracle 11g. The documents from OTN 2 days 11g performance tuning and performance tuning guide are not really study material.
    Has someone idea?
    greeting,
    Max

    Hi,
    http://astore.amazon.com/oraclebooks-20/detail/1590599683 {Part IV Database Tuning }
    Greetings,
    Sim

  • About Performance Tuning in java

    What good ways to improve performance of code that uses lot of strings?

    Use appropriate data structures and algorithms.
    [url http://java.sun.com/developer/technicalArticles/Interviews/devinsight_1/]Write dumb code.
    Don't worry about microoptimizations, and don't look for "clever tricks."
    Don't assume something will be "slow" and then write fugly code to "fix" it. Write clean, simple code using standard idioms, test it, and if it doesn't meet your performance requirements, profile it to find where the bottleneck is, and once you find and fix that, test and profile again to see if the fix actually made a significant improvement. If it didn't, and the new code is not at least as clean as the old, then revert it back to the previous code.
    All of the above advice applies for all Java coding, not just String-heavy cases.
    The only semi-major String-specific performance/memory techniques that come up are as follows. And they don't really matter all that often in the real world:
    1. When building up a String in a loop, if the pieces are large or if there are many pieces, use StringBuilder or StringBuffer's append() method, not direct String concatenation with plus-equal.
    // do this
    String s;
    StringBuilder sb = new StringBuilder();
    while (...) {
      sb.append(something);
    s = sb.toString();
    // not this
    String s = "";
    while (...) {
      s += something;
      // or
      s = s + something;The reason for this is that with the second approach, every time through the loop we create a new String object and copy all the characters over from the previous one. The first approach just keeps adding characters to the end of the existing StringBuilder.
    However, this really only makes a practical difference if the pieces are very large, or if there are a lot of them.
    Also note that String s = "a" + b + "c" + d; is fine, because the compiler turns those into append() calls anyway.
    2. Use new String() when taking a small substring of a large String, if the small one will be kept around much longer than the larger original.
    // do this
    String s1 = a_very_large_string;
    String s2 = new String(s1.substring(5, 7));
    // not this
    String s1 = a_very_large_string;
    String s2 = s1.substring(5, 7);The reason for this is that substring uses the same backing array as the original. If we're done using the large String, that String object itself may become eligible for GC, but the large backing array will be kept around as long as the smaller String is alive. In this case, we're wasting most of its space for just a few characters. However, when we do new String(), that creates a new String object with its own backing array of just the characters that are part of that String, so once the original goes away, its large backing array can go with it.
    If the strings are of about the same scale, or if they're both small or even only "sort of large," this will not be an issue. Also, if both of the Strings' lifetimes end at about the same time, it won't be an issue.
    Again, though, don't overdo it. Pay close attention to the cases I described where these techniques don't matter.
    Edited by: jverd on Oct 6, 2010 10:08 PM
    Edited by: jverd on Oct 6, 2010 10:10 PM
    Edited by: jverd on Oct 6, 2010 10:21 PM

  • KDE4 + wallpaper slideshow: few questions about performance / tuning.

    Hello,
    I am using KDE 4.4 from pacman and set my desktop activity to slideshow. I would like to customize few things and thus - I have few questions:
    1) Is it possible to change / disable transition effect when changing wallpapers? All my desktop is choppy and not responsive while the wallpaper changes and I am wondering if there is a way to repair this? (all images used as walls are at max 3MB big, usually something about 1MB. I have 7200 RPM disk, 2GB of ram and rather fast graphics card with newest Nvidia drivers, so I don't know what is the cause of slowdown...)
    2) How can I programatically progress wallpaper to next image (not with the right click / Next Wallpaper image)?
    3) Is there a way to disable the wallpaper change while there is a fullscreen application running? I am asking this, because when I watch HD movies and the wall changes, movie playback is really choppy... (I think that answer to the first question will also help me in this case).
    I would be glad for any sugestions / interest in helping me;)
    Best regards,
    Mike.

    Hello
    1/ There's no way I know to remove the transition. Using the "raster" graphics engine helps a lot on performance : kill plasma-desktop and launch  `plasma-desktop -graphicssystem raster`
    2/ There's a plasma applet for this :
    http://kde-look.org/content/show.php/Ne … tent=94251
    http://aur.archlinux.org/packages.php?O … twallpaper
    Maybe you can adapt it to your needs / find out how it works.
    Last edited by xvello (2010-05-16 16:20:24)

  • Query for Performance tuning

    Hi,
    I have attached my query and explain plan for that query. This create statement takes around 1.5 hrs for 200K records.
    Is there any way to tune the query.
    CREATE TABLE SC1.TMP_MP_XYZ
    PARALLEL 4 TABLESPACE FT_WORKAREA NOLOGGING AS
    SELECT /*+ ORDERED USE_HASH(x,d) INDEX_FFS(x) PARALLEL(d,4) */
    d.ROWID dis_rowid
    FROM SC2.TMP_GLOBAL PARTITION (PM200802) x,
    SC1.ba_DISP_XX PARTITION (PM200802) d
    WHERE x.dsp_hash IN
    (d.dsp_hash,
    TRUNC (d.dsp_hash, -14),
    TRUNC (d.dsp_hash, -7),
    TRUNC (d.dsp_hash, -14) + MOD (d.dsp_hash, POWER (10, 7))
    AND LOWER (d.url_name) LIKE x.rule || '%'
    AND BITAND (d.xflag, 1) = 0
    AND BITAND (d.xflag, 1) = 0
    Statement Id=14 Type=TABLE ACCESS
    Cost=17004 TimeStamp=06-03-08::10::04:37
    (1) CREATE TABLE STATEMENT CHOOSE
    Est. Rows: 274 Cost: 68,076
    LOAD AS SELECT
    (14) CONCATENATION
    (4) HASH JOIN
    Est. Rows: 1 Cost: 17,019
    (2) UNIQUE INDEX FAST FULL SCAN SC2.IMP_TMP_GLOBAL__NAME [Not Analyzed]
    Est. Rows: 146,873 Cost: 15
    (3) TABLE ACCESS FULL SC1.BA_DISP_XX [Analyzed]
    Blocks: 2,436 Est. Rows: 32 of 31,951 Cost: 17,004
    (7) HASH JOIN
    Est. Rows: 1 Cost: 17,019
    (5) UNIQUE INDEX FAST FULL SCAN SC2.IMP_TMP_GLOBAL _NAME  [Not Analyzed]
    Est. Rows: 146,873 Cost: 15
    (6) TABLE ACCESS FULL SC1.BA_DISP_XX [Analyzed]
    Blocks: 2,436 Est. Rows: 32 of 31,951 Cost: 17,004
    (10) HASH JOIN
    Est. Rows: 1 Cost: 17,019
    (8) UNIQUE INDEX FAST FULL SCAN SC2.IMP_TMP_GLOBAL__NAME [Not Analyzed]
    Est. Rows: 146,873 Cost: 15
    (9) TABLE ACCESS FULL SC1.BA_DISP_XX [Analyzed]
    Blocks: 2,436 Est. Rows: 32 of 31,951 Cost: 17,004
    (13) HASH JOIN
    Est. Rows: 1 Cost: 17,019
    (11) UNIQUE INDEX FAST FULL SCAN SC2.IMP_TMP_GLOBAL _NAME  [Not Analyzed]
    Est. Rows: 146,873 Cost: 15
    (12) TABLE ACCESS FULL SC1.BA_DISP_XX [Analyzed]
    Blocks: 2,436 Est. Rows: 32 of 31,951 Cost: 17,004
    - Mahesh

    First, can you repost with better formatting. Your execution plan has lost any indentation, and everything is at the same level, which makes it difficult to work out the real order of execution. Put the SQL statement and plan between lines with and on them, but with CODE in lower case i.e. code, which the forum engine recognises.
    Second, you seem to have four full table scans on ba_DISP_XX, which is probably due to the IN clause in the WHERE. I don't know what indexes you have, because you don't mention it. But Oracle cannot use ordinary indexes on columns when you apply a function or expression to that column. Which is what you are doing to the dsp_hash column, with the TRUNC function.
    So, the quickest comments I can make are:
    Investigate using function based indexes, but you may need several of them, which all take up disk space.
    Rewrite the query to not use TRUNC, or to use it in a standard way so that a single function based index could be used.
    Get rid of the hints. You are explicitly telling Oracle to use a HASH join, and PARALLEL scan the ba_DISP_XX table. Which is what it is doing in the execution plan. So you are getting what you have asked for.
    The query is very odd. Where is the proper join between tables x and d? I see an IN between them, which is unlikely to be the join. And a LOWER LIKE. If this is the join, then create a function based index on LOWER (d.url_name). Again, without a suitable index, Oracle will scan the full table.
    Bottom line - the query is doing what you want, because you have used hints to tell it to scan that table and use a HASH join, and without using function based indexes Oracle cannot used ordinary indexes for this query. So it will table scan either way.
    John

  • Report running for long time & performance tuning

    Hi All,
    (1). WebI report is running for long time.so what are the steps i need to check for it ?
    (2). Can you tell me about performance tuning in BO ?
    please help me.....
    Thanks
    Kumar

    (1). WebI report is running for long time.so what are the steps i need to check for it ?
    The first step is to see if the problem lies in the query on the data source or in webi itself. Depending on the data source there are different ways to extract the query and try to run it against the database. Which source does your report uses?
    (2). Can you tell me about performance tuning in BO ?
    I would recommend to start by reading the administrator's guide. There is a section about how to improve performance.
    Regards,
    Stratos

  • Need clear steps for doing performance tuning on SQL Server 2008 R2 (DB Engine, Reporting Services and Integration Services)

    We have to inverstigate about a reporting solution where things are getting slow (may be material, database design, network matters).
    I have red a lot in MSDN and some books about performance tuning on SQL Server 2008 R2 (or other) but frankly, I feel a little lost in all that stuff
    I'am looking for practical steps in order to do the tuning. Someone had like a recipe for that : a success story...
    My (brain storm) Methodology should follow these steps:
     Resource bottlenecks: CPU, memory, and I/O bottlenecks
     tempdb bottlenecks
     A slow-running user query : Missing indexes, statistics,...
     Use performance counters : there are many, can one give us the list of the most important
    how to do fine tuning about SQL Server configuration
    SSRS, SSIS configuration ? 
    And do the recommandations.
    Thanks
    "there is no Royal Road to Mathematics, in other words, that I have only a very small head and must live with it..."
    Edsger W. Dijkstra

    Hello,
    There is no clear defined step which can be categorized as step by step to performance tuning.Your first goal is to find out cause or drill down to factor causing slowness of SQL server it can be poorly written query ,missing indexes,outdated stats.RAM crunch
    CPU crunch so on and so forth.
    I generally refer to below doc for SQL server tuning
    http://technet.microsoft.com/en-us/library/dd672789(v=sql.100).aspx
    For SSIS tuning i refer below doc.
    http://technet.microsoft.com/library/Cc966529#ECAA
    http://msdn.microsoft.com/en-us/library/ms137622(v=sql.105).aspx
    When I face issue i generally look at wait stats ,wait stats give you idea about on what resource query was waiting.
    --By Jonathan KehayiasSELECT TOP 10
    wait_type ,
    max_wait_time_ms wait_time_ms ,
    signal_wait_time_ms ,
    wait_time_ms - signal_wait_time_ms AS resource_wait_time_ms ,
    100.0 * wait_time_ms / SUM(wait_time_ms) OVER ( )
    AS percent_total_waits ,
    100.0 * signal_wait_time_ms / SUM(signal_wait_time_ms) OVER ( )
    AS percent_total_signal_waits ,
    100.0 * ( wait_time_ms - signal_wait_time_ms )
    / SUM(wait_time_ms) OVER ( ) AS percent_total_resource_waits
    FROM sys.dm_os_wait_stats
    WHERE wait_time_ms > 0 -- remove zero wait_time
    AND wait_type NOT IN -- filter out additional irrelevant waits
    ( 'SLEEP_TASK', 'BROKER_TASK_STOP', 'BROKER_TO_FLUSH',
    'SQLTRACE_BUFFER_FLUSH','CLR_AUTO_EVENT', 'CLR_MANUAL_EVENT',
    'LAZYWRITER_SLEEP', 'SLEEP_SYSTEMTASK', 'SLEEP_BPOOL_FLUSH',
    'BROKER_EVENTHANDLER', 'XE_DISPATCHER_WAIT', 'FT_IFTSHC_MUTEX',
    'CHECKPOINT_QUEUE', 'FT_IFTS_SCHEDULER_IDLE_WAIT',
    'BROKER_TRANSMITTER', 'FT_IFTSHC_MUTEX', 'KSOURCE_WAKEUP',
    'LAZYWRITER_SLEEP', 'LOGMGR_QUEUE', 'ONDEMAND_TASK_QUEUE',
    'REQUEST_FOR_DEADLOCK_SEARCH', 'XE_TIMER_EVENT', 'BAD_PAGE_PROCESS',
    'DBMIRROR_EVENTS_QUEUE', 'BROKER_RECEIVE_WAITFOR',
    'PREEMPTIVE_OS_GETPROCADDRESS', 'PREEMPTIVE_OS_AUTHENTICATIONOPS',
    'WAITFOR', 'DISPATCHER_QUEUE_SEMAPHORE', 'XE_DISPATCHER_JOIN',
    'RESOURCE_QUEUE' )
    ORDER BY wait_time_ms DESC
    use below link to analyze wait stats
    http://www.sqlskills.com/blogs/paul/wait-statistics-or-please-tell-me-where-it-hurts/
    HTH
    PS: for reporting services you can post in SSRS forum
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Performance tuning SELECTs:  Can I force a TRUE db read every time?

    Good day everyone!
    I've been programming in ABAP for almost 6 years now, and I'd like to begin learning more about performance tuning with respect to database performance.
    More specifically, I'm testing some things in a particular SELECT in a report program we have that is timing out in the foreground because of the SELECT.  When I first run the program, the SELECT goes against the database, as we all know.  Subsequent runs, however, use the buffered data, so the response is a lot quicker and doesn't really reflect that first, initial database read.
    Am I correct in assuming that I should be testing my various approaches and collecting performance runtimes against that initial, "true" database read?  If that's the case, is there any way I can force the system to actually read the database instead of the buffered data?  For those experienced with this kind of performance analysis and tuning, what's the best approach for someone very new to this area such as myself?
    Thank you,
    Dave

    Hi Dave and Rob,
    Just my two cents (and yes, I know this is already answered, but..).
    I think you might be confusing 2 things: one is SAP buffering, and another one is caching at other levels (database, operating system, etc).
    From what I understood Rob was talking mainly about SAP buffering. In that context it is true that if there is a first execution that loads the buffers (for example, some not so small fully buffered tables) then that is an atypical execution, and should be discarded. In real life you will never have execution times like those, except maybe on the very first execution on a monday morning.
    Another thing is database caching. If you execute a report twice with exactly the same parameters then you might not be actually making physical reads in the second execution. This second execution will be very fast, but that will not be simulating real life: no user wants a report to be fast the second time you execute it with exactly the same parameters.
    To avoid this in Oracle you can empty the so-called SGA, but that is not so useful and it will probably not get you closer to what happens in the real life.
    So what to do? In doubt, measure it several times, with different parameters, and probably exclude the extreme values.
    Regards,
    Rui Dantas

  • Performance tuning of a function which is part of a package.

    Hello
    I just built a function in a package. And now I want to make sure that the SQL is well tuned.
    I was going through the links mentioned in this post
    Performance Tuning
    to know more about performance tuning.
    But I am confused with some simple things.
    So when we analyze a single function present in a package , should I use the SQL of the function or
    should I use a call to that function.
    For example first I thought of using EXPLAIN PLAN.
    I see a different explain plan when I use a call to that function then
    when I use the actual SQL of the function with some plugged in parameters whereever required.
    What is the right way of doing it?
    Thank you

    I recommend :
    1. use SQL tracing with DBMS_MONITOR and then TKPROF on raw SQL trace file
    2. call the function as it used in your production environment
    See good examples in http://www.oracle-base.com/articles/10g/SQLTrace10046TrcsessAndTkprof10g.php (just refer to DBMS_MONITOR examples and TKPROF).
    Note that SQL trace will only trace SQL and not PL/SQL. If SQL elapsed time does not match function call elapsed time close enough, you need to use DBMS_PROFILER to know where PL/SQL non SQL code elapsed time is used.
    I don't recommend using EXPLAIN PLAN because it has known limitations http://docs.oracle.com/cd/E11882_01/server.112/e16638/ex_plan.htm#PFGRF94673 (others have said "EXPLAIN PLAN lies" - you can google for this expression ....).
    Edited by: P. Forstmann on 10 févr. 2012 19:44

  • Can Anybody Send Me The Latest Testking Pdf Of  1z0-033 (Performance Tuning

    Hello,
    Can Anybody Send Me The Latest Testking Pdf Of 1z0-033 (Performance Tuning
    my email address is asiforacle [email protected]
    Regards,
    Asif Iqbal
    Software Engineer. ( Karachi, Pakistan ).

    The answer is surely NO but what I would like to ask for the sake of curiosity , why did you ask about Performance Tuning questions over Sql /Plsql forum , not on Database General Forum? Not that you should go there now and ask, just curious.
    Tell you what, read the free book(yup free). Here it is,
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96533.pdf
    You won't need anything else to read, not even that testking stuff too.
    HTH
    Aman....

  • Performance tuning in Query

    Dear All,
    My client wants to do the performance tuning in a query where it has the Global structure of 300 CKF & 300 RKF.
    They dont want to touch the MP, all they want to do some performance tuning through the front end without touching the Multiprovider.
    The CKF is little bit tricky where in Each CKF has 28 RKF and In each RKF atleast 2 variables are used an with hierarchy restrictions. The query is taking 30 - 40 min to execute. Kindly guide me how to handle this.
    Regards,
    Suman Thangadurai.

    HI,
    Improving query performance u2013
    -     Generate index.
    -     Build query on multiprovider and better use Constant Selection Function to bring infoset functionality to Multiprovider.
    -     Make your query more dynamic using variables.
    -     Do partitioning on IC when you have restriction on 0CALMONTH.
    -     Use more free charecterstics.
    -     Use include than exclude at Bex level.
    -     Utilize Cache mode and Read mode functions.
    Regards,
    rvc

  • Performance Tuning Query on Large Tables

    Hi All,
    I am new to the forums and have a very specic use case which requires performance tuning, but there are some limitations on what changes I am actualy able to make to the underlying data. Essentially I have two tables which contain what should be identical data, but for reasons of a less than optimal operational nature, the datasets are different in a number of ways.
    Essentially I am querying call record detail data. Table 1 (refered to in my test code as TIME_TEST) is what I want to consider the master data, or the "ultimate truth" if you will. Table one contains the CALLED_NUMBER which is always in a consistent format. It also contains the CALLED_DATE_TIME and DURATION (in seconds).
    Table 2 (TIME_TEST_COMPARE) is a reconciliation table taken from a different source but there is no consistent unique identifiers or PK-FK relations. This table contains a wide array of differing CALLED_NUMBER formats, hugely different to that in the master table. There is also scope that the time stamp may be out by up to 30 seconds, crazy I know, but that's just the way it is and I have no control over the source of this data. Finally the duration (in seconds) can be out by up to 5 seconds +/-.
    I want to create a join returning all of the master data and matching the master table to the reconciliation table on CALLED_NUMBER / CALL_DATE_TIME / DURATION. I have written the query which works from a logi perspective but it performs very badly (master table = 200,000 records, rec table = 6,000,000+ records). I am able to add partitions (currently the tables are partitioned by month of CALL_DATE_TIME) and can also apply indexes. I cannot make any changes at this time to the ETL process loading the data into these tables.
    I paste below the create table and insert scripts to recreate my scenario & the query that I am using. Any practical suggestions for query / table optimisation would be greatly appreciated.
    Kind regards
    Mike
    -------------- NOTE: ALL DATA HAS BEEN DE-SENSITISED
    /* --- CODE TO CREATE AND POPULATE TEST TABLES ---- */
    --CREATE MAIN "TIME_TEST" TABLE: THIS TABLE HOLDS CALLED NUMBERS IN A SPECIFIED/PRE-DEFINED FORMAT
    CREATE TABLE TIME_TEST ( CALLED_NUMBER VARCHAR2(50 BYTE),
                                            CALLED_DATE_TIME DATE, DURATION NUMBER );
    COMMIT;
    -- CREATE THE COMPARISON TABLE "TIME_TEST_COMPARE": THIS TABLE HOLDS WHAT SHOULD BE (BUT ISN'T) IDENTICAL CALL DATA.
    -- THE DATA CONTAINS DIFFERING NUMBER FORMATS, SLIGHTLY DIFFERENT CALL TIMES (ALLOW +/-60 SECONDS - THIS IS FOR A GOOD, ALBEIT UNHELPFUL, REASON)
    -- AND DURATIONS (ALLOW +/- 5 SECS)                                        
    CREATE TABLE TIME_TEST_COMPARE ( CALLED_NUMBER VARCHAR2(50 BYTE),
                                       CALLED_DATE_TIME DATE, DURATION NUMBER )                                        
    COMMIT;
    --CREATE INSERT DATA FOR THE MAIN TEST TIME TABLE
    INSERT INTO TIME_TEST ( CALLED_NUMBER, CALLED_DATE_TIME,
    DURATION ) VALUES (
    '7721345675', TO_DATE( '11/09/2011 06:10:21 AM', 'MM/DD/YYYY HH:MI:SS AM'), 202);
    INSERT INTO TIME_TEST ( CALLED_NUMBER, CALLED_DATE_TIME,
    DURATION ) VALUES (
    '7721345675', TO_DATE( '11/09/2011 08:10:21 AM', 'MM/DD/YYYY HH:MI:SS AM'), 19);
    INSERT INTO TIME_TEST ( CALLED_NUMBER, CALLED_DATE_TIME,
    DURATION ) VALUES (
    '7721345675', TO_DATE( '11/09/2011 07:10:21 AM', 'MM/DD/YYYY HH:MI:SS AM'), 35);
    INSERT INTO TIME_TEST ( CALLED_NUMBER, CALLED_DATE_TIME,
    DURATION ) VALUES (
    '7721345675', TO_DATE( '11/09/2011 09:10:21 AM', 'MM/DD/YYYY HH:MI:SS AM'), 30);
    INSERT INTO TIME_TEST ( CALLED_NUMBER, CALLED_DATE_TIME,
    DURATION ) VALUES (
    '7721345675', TO_DATE( '11/09/2011 06:18:47 AM', 'MM/DD/YYYY HH:MI:SS AM'), 6);
    INSERT INTO TIME_TEST ( CALLED_NUMBER, CALLED_DATE_TIME,
    DURATION ) VALUES (
    '7721345675', TO_DATE( '11/09/2011 06:20:21 AM', 'MM/DD/YYYY HH:MI:SS AM'), 20);
    COMMIT;
    -- CREATE INSERT DATA FOR THE TABLE WHICH NEEDS TO BE COMPARED:
    INSERT INTO TIME_TEST_COMPARE ( CALLED_NUMBER, CALLED_DATE_TIME,
    DURATION ) VALUES (
    '7721345675', TO_DATE( '11/09/2011 06:10:51 AM', 'MM/DD/YYYY HH:MI:SS AM'), 200);
    INSERT INTO TIME_TEST_COMPARE ( CALLED_NUMBER, CALLED_DATE_TIME,
    DURATION ) VALUES (
    '00447721345675', TO_DATE( '11/09/2011 08:10:59 AM', 'MM/DD/YYYY HH:MI:SS AM'), 21);
    INSERT INTO TIME_TEST_COMPARE ( CALLED_NUMBER, CALLED_DATE_TIME,
    DURATION ) VALUES (
    '07721345675', TO_DATE( '11/09/2011 07:11:20 AM', 'MM/DD/YYYY HH:MI:SS AM'), 33);
    INSERT INTO TIME_TEST_COMPARE ( CALLED_NUMBER, CALLED_DATE_TIME,
    DURATION ) VALUES (
    '+447721345675', TO_DATE( '11/09/2011 09:10:01 AM', 'MM/DD/YYYY HH:MI:SS AM'), 33);
    INSERT INTO TIME_TEST_COMPARE ( CALLED_NUMBER, CALLED_DATE_TIME,
    DURATION ) VALUES (
    '+447721345675#181345', TO_DATE( '11/09/2011 06:18:35 AM', 'MM/DD/YYYY HH:MI:SS AM')
    , 6);
    INSERT INTO TIME_TEST_COMPARE ( CALLED_NUMBER, CALLED_DATE_TIME,
    DURATION ) VALUES (
    '004477213456759777799', TO_DATE( '11/09/2011 06:19:58 AM', 'MM/DD/YYYY HH:MI:SS AM')
    , 17);
    COMMIT;
    /* --- QUERY TO UNDERTAKE MATCHING WHICH REQUIRES OPTIMISATION --------- */
    SELECT MAIN.CALLED_NUMBER AS MAIN_CALLED_NUMBER, MAIN.CALLED_DATE_TIME AS MAIN_CALL_DATE_TIME, MAIN.DURATION AS MAIN_DURATION,
         COMPARE.CALLED_NUMBER AS COMPARE_CALLED_NUMBER,COMPARE.CALLED_DATE_TIME AS COMPARE_CALLED_DATE_TIME,
         COMPARE.DURATION COMPARE_DURATION     
    FROM
    SELECT CALLED_NUMBER, CALLED_DATE_TIME, DURATION
    FROM TIME_TEST
    ) MAIN
    LEFT JOIN
    SELECT CALLED_NUMBER, CALLED_DATE_TIME, DURATION
    FROM TIME_TEST_COMPARE
    ) COMPARE
    ON INSTR(COMPARE.CALLED_NUMBER,MAIN.CALLED_NUMBER)<> 0
    AND MAIN.CALLED_DATE_TIME BETWEEN COMPARE.CALLED_DATE_TIME-(60/86400) AND COMPARE.CALLED_DATE_TIME+(60/86400)
    AND MAIN.DURATION BETWEEN MAIN.DURATION-(5/86400) AND MAIN.DURATION+(5/86400);

    What does your execution plan look like?

  • VAL_FIELD selection to determine RSDRI or MDX query: performance tuning

    according to on of the HTG I am working on performance tuning. one of the tip is to try to query base members by using BAS(xxx) in the expension pane of BPC report.
    I did so and found an interesting issue in one of the COPA report.
    with income statement, when I choose one node gross_profit, saying BAS(GROSS_PROFIT), it generates RSDRI query as I can see in UJSTAT. when I choose its parent, BAS(DIRECT_INCOME), it generates MDX query!
    I checked DIRECT_INCOME has three members, GROSS_PROFIT, SGA, REV_OTHER. , none of them has any formulars.
    in stead of calling BAS(DIRECT_INCOME), I called BAS(GROSS_PROFIT),BAS(SGA),BAS(REV_OTHER), I got RSDRI query again.
    so in smmary,
    BAS(PARENT) =>MDX query.
    BAS(CHILD1)=>RSDRI query.
    BAS(CHILD2)=>RSDRI query.
    BAS(CHILD3)=>RSDRI query.
    BAS(CHILD1),BAS(CHILD2),BAS(CHILD3)=>RSDRI query
    I know VAL_FIELD is SAP reserved name for BPC dimensions.  my question is why BAS(PARENT) =>MDX query.?
    interestingly I can repeat this behavior in my system. my intention is to always get RSDRI query,
    George

    Ok - it turns out that Crystal Reports disregards BEx Query variables when put in the Default Values section of the filter selection. 
    I had mine there and even though CR prompted me for the variables AND the SQL statement it generated had an INCLUDE statement with hose variables I could see by my result set that it still returned everything in the cube as if there was no restriction on Plant for instance.
    I should have paid more attention to the Info message I got in the BEx Query Designed.  It specifically states that the "Variable located in Default Values will be ignored in the MDX Access".
    After moving the variables to the Characteristic Restrictions my report worked as expected.  The slow response time is still an issue but at least it's not compounded by trying to retrieve all records in the cube while I'm expecting less than 2k.
    Hope this helps someone else

  • Reg: Process Chain, query performance tuning steps

    Hi All,
    I come across a question like,  There is a process chain of 20 processes.out of which 5 processes are completed at the 6th step error occured and it cannot be rectified. I should start the chain again from the 7th step.If i go to a prticular step i can do that particular step, How can i start the entair chain again from step 7.i know that i need to use a function module but i dont know the name of FM. Please somebody help me out.
    Please let me know the steps involved in query performance tuning and aggregate tuning.
    Thanks & Regards
    Omkar.K

    Hi,
    Process Chain
    Method 1 (when it fails in a step/request)
    /people/siegfried.szameitat/blog/2006/02/26/restarting-processchains
    How is it possible to restart a process chain at a failed step/request?
    Sometimes, it doesn't help to just set a request to green status in order to run the process chain from that step on to the end.
    You need to set the failed request/step to green in the database as well as you need to raise the event that will force the process chain to run to the end from the next request/step on.
    Therefore you need to open the messages of a failed step by right clicking on it and selecting 'display messages'.
    In the opened popup click on the tab 'Chain'.
    In a parallel session goto transaction se16 for table rspcprocesslog and display the entries with the following selections:
    1. copy the variant from the popup to the variante of table rspcprocesslog
    2. copy the instance from the popup to the instance of table rspcprocesslog
    3. copy the start date from the popup to the batchdate of table rspcprocesslog
    Press F8 to display the entries of table rspcprocesslog.
    Now open another session and goto transaction se37. Enter RSPC_PROCESS_FINISH as the name of the function module and run the fm in test mode.
    Now copy the entries of table rspcprocesslog to the input parameters of the function module like described as follows:
    1. rspcprocesslog-log_id -> i_logid
    2. rspcprocesslog-type -> i_type
    3. rspcprocesslog-variante -> i_variant
    4. rspcprocesslog-instance -> i_instance
    5. enter 'G' for parameter i_state (sets the status to green).
    Now press F8 to run the fm.
    Now the actual process will be set to green and the following process in the chain will be started and the chain can run to the end.
    Of course you can also set the state of a specific step in the chain to any other possible value like 'R' = ended with errors, 'F' = finished, 'X' = cancelled ....
    Check out the value help on field rspcprocesslog-state in transaction se16 for the possible values.
    Query performance tuning
    General tips
    Using aggregates and compression.
    Using  less and complex cell definitions if possible.
    1. Avoid using too many nav. attr
    2. Avoid RKF and CKF
    3. Many chars in row.
    By using T-codes ST03 or ST03N
    Go to transaction ST03 > switch to expert mode > from left side menu > and there in system load history and distribution for a particual day > check query execution time.
    /people/andreas.vogel/blog/2007/04/08/statistical-records-part-4-how-to-read-st03n-datasets-from-db-in-nw2004
    /people/andreas.vogel/blog/2007/03/16/how-to-read-st03n-datasets-from-db
    Try table rsddstats to get the statistics
    Using cache memoery will decrease the loading time of the report.
    Run reporting agent at night and sending results to email.This will ensure use of OLAP cache. So later report execution will retrieve the result faster from the OLAP cache.
    Also try
    1.  Use different parameters in ST03 to see the two important parameters aggregation ratio and records transferred to F/E to DB selected.
    2. Use the program SAP_INFOCUBE_DESIGNS (Performance of BW infocubes) to see the aggregation ratio for the cube. If the cube does not appear in the list of this report, try to run RSRV checks on the cube and aggregates.
    Go to SE38 > Run the program SAP_INFOCUBE_DESIGNS
    It will shown dimension Vs Fact tables Size in percent.If you mean speed of queries on a cube as performance metric of cube,measure query runtime.
    3. --- sign is the valuation of the aggregate. You can say -3 is the valuation of the aggregate design and usage. ++ means that its compression is good and access is also more (in effect, performance is good). If you check its compression ratio, it must be good. -- means the compression ratio is not so good and access is also not so good (performance is not so good).The more is the positives...more is useful the aggregate and more it satisfies the number of queries. The greater the number of minus signs, the worse the evaluation of the aggregate. The larger the number of plus signs, the better the evaluation of the aggregate.
    if "-----" then it means it just an overhead. Aggregate can potentially be deleted and "+++++" means Aggregate is potentially very useful.
    Refer.
    http://help.sap.com/saphelp_nw70/helpdata/en/b8/23813b310c4a0ee10000000a114084/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/60/f0fb411e255f24e10000000a1550b0/frameset.htm
    4. Run your query in RSRT and run the query in the debug mode. Select "Display Aggregates Found" and "Do not use cache" in the debug mode. This will tell you if it hit any aggregates while running. If it does not show any aggregates, you might want to redesign your aggregates for the query.
    Also your query performance can depend upon criteria and since you have given selection only on one infoprovider...just check if you are selecting huge amount of data in the report
    Check for the query read mode in RSRT.(whether its A,X or H)..advisable read mode is X.
    5. In BI 7 statistics need to be activated for ST03 and BI admin cockpit to work.
    By implementing BW Statistics Business Content - you need to install, feed data and through ready made reports which for analysis.
    http://help.sap.com/saphelp_nw70/helpdata/en/26/4bc0417951d117e10000000a155106/frameset.htm
    /people/vikash.agrawal/blog/2006/04/17/query-performance-150-is-aggregates-the-way-out-for-me
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1955ba90-0201-0010-d3aa-8b2a4ef6bbb2
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ce7fb368-0601-0010-64ba-fadc985a1f94
    http://help.sap.com/saphelp_nw04/helpdata/en/c1/0dbf65e04311d286d6006008b32e84/frameset.htm
    You can go to T-Code DB20 which gives you all the performance related information like
    Partitions
    Databases
    Schemas
    Buffer Pools
    Tablespaces etc
    use tool RSDDK_CHECK_AGGREGATE in se38 to check for the corrupt aggregates
    If aggregates contain incorrect data, you must regenerate them.
    Note 646402 - Programs for checking aggregates (as of BW 3.0B SP15)
    Thanks,
    JituK

  • Oracle query performance tuning

    Hi
    I am doing Oracle programming.Iwould like to learn Query Performance Tuning.
    Could you guide me , like how could i learn this online, which books to refer.
    Thank you

    I would recommend purchasing a copy of Cary Millsap's book now:
    http://www.amazon.com/Optimizing-Oracle-Performance-Cary-Millsap/dp/059600527X/ref=sr_1_1?ie=UTF8&qid=1248985270&sr=8-1
    And Jonathan Lewis' when you feel you are at a slightly more advanced level.
    http://www.amazon.com/Cost-Based-Oracle-Fundamentals-Experts-Voice/dp/1590596366/ref=pd_sim_b_2
    Both belong in everyone's bookcase.

Maybe you are looking for

  • Macbook won't detect an external display

    Recently I decided to attempt to connect my Macbook to my new Sharp LCD TV. I have a mini DVI to DVI cable and then a DVI to VGA. When I hook up my Mac, nothing comes up. The television similarly displays 'No Signal'. The screen on the macbook goes b

  • Indesign Standard Plug-in MISSING.

    Hi, McAfee has deleted one of my Indesign Plug-ins as it was affected by a trojan, meaning my indesign will not start. The plug-in deleted is 'Gradient Fill' Saved as Gradient Fill.rpln in: C:\Program Files\Adobe\Adobe InDesign CS5\Required I would b

  • Monitor color off - PDF text lines highlighted

    When I open any PDF file, my monitor wallpaper becomes pixelated and changes colors and looks like a negative.  The lines of text in the file are either blacked out or highlighted with other colors.  I have had tech support clean my computer system t

  • JavaScript: Disabling textarea in report column cell

    Hi, Andi (ATD) helped me with formatting report columns, coloring them depending on a value. See: Javascript - Referencing report column value Now I want to add a feature: If the value is '1' then disable the textarea in the next column, otherwise no

  • Unable to launch Instant Messaging Service

    Hi, I have a IM channel deployed on a portal desktop as one of the portlet. When I click Launch Instant Messanger in IM channel , following error is displayed: "Unable/Cannot to launch Instant Messaging" . I am not getting to know why this error is d