Run the function swap State

Hi all.

I have a small program that I encountered a problem on.

IM using the following HTTPService to get a value from an XML file.

"< mx:HTTPService id = 'State' result =" handleState (event) "url =" change.xml "method ="POST">
< mx:request xmlns = "" >
< dataDumping >
{dataDump}
< / dataDumping >
< / mx:request >
< / mx:HTTPService >

I then use the following function to process the result.

private void handleState(event:ResultEvent):void
{
currentState = event.result.state;
}

This works very well, if I change the value in the XML file, the application changes the State being viewed to anyone currently using the application.

The only problem I am facing now, do I want a State to automatically redirect a Web site.

For example, I have a State labeled 'Finish', so when I have this entry in the XML file, the application automatically changes state by State "Finish."  This works very well, but how can I work in the automatic rerouting?

I know that this is the code to treat links URL etc.

click = "navigateToURL (new URLRequest ("http://www.google.com/' "),"_self")" "

Although I see not to run.

Any ideas?

Hello

Maybe I'm bored of what you do, but wouldn't it be something like this...

private void handleState(event:ResultEvent):void
{

If (event.result.state == 'finished')

navigateToURL (new URLRequest ("http://www.google.com/"), "_self")

on the other

currentState = event.result.state;
}

David

Tags: Flex

Similar Questions

  • Run the function after the update of values

    I am writing a pretty basic plugin where I need to have a function to run after a point values have been updated.

    I do this to change the point values:

    params [POINT]-> u.td.x_value = FLOAT2FIX (pointX);

    params [POINT]-> u.td.y_value = FLOAT2FIX (pointY);

    params [POINT]-> uu.change_flags = PF_ChangeFlag_CHANGED_VALUE;

    This works very well for updating the values, but the code that goes after this block is executed until the values change really. Is there a way to force change to happen once I set new values or is there another place I can put the function so that it is executed after the values are actually changed?

    Hi Jesse Toula. Welcome to the forum!

    If you want to change is instantaneous, you can use AEGP_SetStreamValue() instead of the method that you use.

    There is no function that is guaranteed to be called when you change the values.

    UPDATE_PARAMS_UI could be called, and also a call of minutes is likely.

    You can set a flag in the sequence data to inform yourself of the pos - t change operations that must take place in such cases.

    personally, I'd go with the AEGP_SetStreamValue() solution.

  • Problem running the function mouseup

    Hi all... I try to get something very simple to work

    I draw a rewctangle and then "On mouseUp", I run the code "test()"

    Then, in the scene/creationComplete, this function I

    function test(){}

    Alert ("Hello");

    }

    Nothing seems to happen, im trying to do something a little more complex then, but for now all I want to do is be able to perform functions from Adobe Edge.

    My understanding is that creationComplete is where I put functions that can be accessed from anywhere in my composition...

    Thanks for the research!...

    Justin.


    OK Justin. Try the attached example.

    Thank you

    Soline

  • How to convert the next update of FORALL to run the SQL UPDATE statement

    I have a FORALL loop for updating a table. It takes too much time. I want to rewrite the code to a direct sql UPDATE. Also of other tips or tricks that can help to run the fastest proc?
    CURSOR cur_bst_tm IS
    SELECT listagg(tm, ' ') WITHIN GROUP(ORDER BY con_addr_id) best_time,
           con_addr_id
       FROM   (select Trim(Upper(con_addr_id)) con_addr_id,
                      '&'
                      ||decode(Initcap(start_day), 
                                      'Monday', 'm',
                                    'Tuesday', 'tu',
                                    'Wednesday', 'w',
                                    'Thursday', 'th',
                                    'Friday', 'f',
                                     Initcap(start_day))
                      ||'='
                      ||trunc(( ( TO_DATE(start_tm,'HH12:MI:SS PM') - trunc(TO_DATE(start_tm,'HH12:MI:SS PM')) ) * 24 * 60 ))
                      ||','
                      ||trunc(( ( TO_DATE(end_tm,'HH12:MI:SS PM') - trunc(TO_DATE(end_tm,'HH12:MI:SS PM')) ) * 24 * 60 )) tm
               FROM   (SELECT DISTINCT * FROM ODS_IDL_EDGE_OFFC_BST_TM)
                 WHERE con_addr_id is not null)
      GROUP  BY con_addr_id
      ORDER BY con_addr_id;
    
    TYPE ARRAY IS TABLE OF cur_bst_tm%ROWTYPE;
    l_data ARRAY;
    
    
    BEGIN
    
     OPEN cur_bst_tm;
        
         LOOP
        FETCH cur_bst_tm BULK COLLECT INTO l_data LIMIT 1000;
    
        FORALL i IN 1..l_data.COUNT
      
          UPDATE ODS_CONTACTS_ADDR tgt
          SET best_times = l_data(i).best_time,
          ODW_UPD_BY = 'IDL - MASS MARKET',
           ODW_UPD_DT = SYSDATE,
          ODW_UPD_BATCH_ID = '0'
          WHERE Upper(edge_id) = l_data(i).con_addr_id
           AND EXISTS (SELECT 1 FROM ods_idl_edge_cont_xref src
                       WHERE tgt.contacts_odw_id = src.contacts_odw_id
                          AND src.pc_flg='Y')   
           ;       
    
        EXIT WHEN cur_bst_tm%NOTFOUND;
        END LOOP;
         
      CLOSE cur_bst_tm;
    Record count: -.

    Select count (*) from
    ODS_IDL_EDGE_OFFC_BST_TM;
    140 000

    SELECT count (*)
    Ods_idl_edge_cont_xref SRC
    WHERE src.pc_flg = 'Y';
    118 000

    SELECT count (*)
    OF ODS_CONTACTS_ADDR;
    671 925

    Version of database 11g.

    Execution plan for update:
    Operation object name lines cost/output PStart PStop object node bytes

    Mode of UPDATE STATEMENT Optimizer = ALL_ROWS 6 K 8120
    UPDATE ODW_OWN2. ODS_CONTACTS_ADDR
    SEMI 6 K 256 K 8120 HASH JOIN
    TABLE ACCESS FULL ODW_OWN2. ODS_CONTACTS_ADDR 6 K 203 K 7181
    TABLE ACCESS FULL ODW_OWN2. ODS_IDL_EDGE_CONT_XREF K 118 922 K 938

    Edited by: user10566312 May 14, 2012 01:07
  • Query by running the Diffrence of STATS$ EVENT_HISTOGRAM

    I am tiring to perform an analysis on STATS$ EVENT_HISTOGRAM (created in PERFSTAT).

    I would like to end up with a result like this;
    SNAP_ID   SNAP_TIME                 DB_RESTART    WAIT_COUNT_LE_7MS   WAIT_COUNT_GT_7MS  TOTAL_WAIT_COUNT   WAIT_COUNT_PERCENT_LE_7MS  WAIT_COUNT_PERCENT_GT_7MS
    397          2/9/2012 2:02:39 PM    NO             3,311              16,261             19,572             16.92                      83.08
    398          2/9/2012 2:35:03 PM    NO             10,040             11,499             21,539             46.61                      53.39
    399          2/9/2012 5:02:22 PM    YES            11,137             113,916            225,053            49.38                      50.62
    400          2/9/2012 5:32:21 PM    NO             5,880              5,047              10,927             53.81                      46.19
    401          2/9/2012 6:02:21 PM    NO             1,342              3,004              4,346              30.88                      69.12
    The rules are (I know so far):
    1. all values correspond to the difference of the previous SNAP_ID
    2. the first SNAP_ID has no precedential value, so it will not appear in the result set. In our case, it was SNAP_ID 396.
    3. when the STATS$ SNAPSHOT. STARTUP_TIME the row changes previous this indicates a DB_RESTART = YES.
    4. when DB_RESTART = YES do not subtract the values of previous SNAP_ID.

    I'm on Oracle 11.1.0.7

    Create the table EVENT_HISTOGRAM STATS$:
    CREATE TABLE STATS$EVENT_HISTOGRAM
    (
      SNAP_ID          NUMBER,
      DBID             NUMBER,
      INSTANCE_NUMBER  NUMBER,
      EVENT_ID         NUMBER,
      WAIT_TIME_MILLI  NUMBER,
      WAIT_COUNT       NUMBER
    );
    Load my data in the table EVENT_HISTOGRAM STATS$:
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI,WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 1,47088592);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 2, 7397910);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 4, 1049509);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 8, 2384662);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 16, 12446589);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 32, 6698196);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 64, 934431);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 128, 655758);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 256, 213053);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 512, 73814);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 1024, 6088);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 2048, 1825);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 4096, 2169);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 8192, 3122);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 16384, 4144);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 32768, 330);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 65536, 662);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 131072, 9);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 262144, 28);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (396, 2359907137, 1, 2652584166, 524288, 22);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 1, 47091161);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 2, 7398497);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 4, 1049664);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 8, 2386574);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 16, 12454531);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 32, 6701651);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 64, 934831);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 128, 656657);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 256, 213223);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 512, 74218);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 1024, 6167);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 2048, 1869);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 4096, 2237);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 8192, 3317);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 16384, 4779);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 32768, 358);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 65536, 663);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 131072, 12);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 262144, 47);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (397, 2359907137, 1, 2652584166, 524288, 29);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 1, 47100463);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 2, 7399116);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 4, 1049783);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 8, 2387726);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 16, 12459548);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 32, 6704135);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 64, 935351);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 128, 657496);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 256, 213525);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 512, 74515);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 1024, 6224);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 2048, 1898);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 4096, 2323);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 8192, 3503);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 16384, 5229);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 32768, 381);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 65536, 671);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 131072, 20);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 262144, 68);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (398, 2359907137, 1, 2652584166, 524288, 49);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (399, 2359907137, 1, 2652584166, 1, 86466);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (399, 2359907137, 1, 2652584166, 2, 20937);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (399, 2359907137, 1, 2652584166, 4, 3734);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (399, 2359907137, 1, 2652584166, 8, 11128);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (399, 2359907137, 1, 2652584166, 16, 58220);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (399, 2359907137, 1, 2652584166, 32, 33902);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (399, 2359907137, 1, 2652584166, 64, 5707);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (399, 2359907137, 1, 2652584166, 128, 3308);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (399, 2359907137, 1, 2652584166, 256, 1149);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (399, 2359907137, 1, 2652584166, 512, 413);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (399, 2359907137, 1, 2652584166, 1024, 40);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (399, 2359907137, 1, 2652584166, 2048, 25);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (399, 2359907137, 1, 2652584166, 4096, 12);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (399, 2359907137, 1, 2652584166, 8192, 7);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (399, 2359907137, 1, 2652584166, 16384, 4);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (399, 2359907137, 1, 2652584166, 32768, 0);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (399, 2359907137, 1, 2652584166, 65536, 1);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (400, 2359907137, 1, 2652584166, 1, 88335);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (400, 2359907137, 1, 2652584166, 2, 24658);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (400, 2359907137, 1, 2652584166, 4, 4024);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (400, 2359907137, 1, 2652584166, 8, 11678);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (400, 2359907137, 1, 2652584166, 16, 61227);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (400, 2359907137, 1, 2652584166, 32, 35252);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (400, 2359907137, 1, 2652584166, 64, 5821);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (400, 2359907137, 1, 2652584166, 128, 3316);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (400, 2359907137, 1, 2652584166, 256, 1158);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (400, 2359907137, 1, 2652584166, 512, 421);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (400, 2359907137, 1, 2652584166, 1024, 41);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (400, 2359907137, 1, 2652584166, 2048, 25);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (400, 2359907137, 1, 2652584166, 4096, 12);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (400, 2359907137, 1, 2652584166, 8192, 7);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (400, 2359907137, 1, 2652584166, 16384, 4);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (400, 2359907137, 1, 2652584166, 32768, 0);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (400, 2359907137, 1, 2652584166, 65536, 1);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (401, 2359907137, 1, 2652584166, 1, 89498);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (401, 2359907137, 1, 2652584166, 2, 24811);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (401, 2359907137, 1, 2652584166, 4, 4050);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (401, 2359907137, 1, 2652584166, 8, 11919);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (401, 2359907137, 1, 2652584166, 16, 62776);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (401, 2359907137, 1, 2652584166, 32, 36157);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (401, 2359907137, 1, 2652584166, 64, 5993);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (401, 2359907137, 1, 2652584166, 128, 3424);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (401, 2359907137, 1, 2652584166, 256, 1181);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (401, 2359907137, 1, 2652584166, 512, 427);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (401, 2359907137, 1, 2652584166, 1024, 41);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (401, 2359907137, 1, 2652584166, 2048, 25);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (401, 2359907137, 1, 2652584166, 4096, 12);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (401, 2359907137, 1, 2652584166, 8192, 7);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (401, 2359907137, 1, 2652584166, 16384, 4);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (401, 2359907137, 1, 2652584166, 32768, 0);
    Insert into STATS$EVENT_HISTOGRAM (SNAP_ID, DBID, INSTANCE_NUMBER, EVENT_ID, WAIT_TIME_MILLI, WAIT_COUNT)
     Values (401, 2359907137, 1, 2652584166, 65536, 1);
    COMMIT;
    Create STATS$ snapshot table:
    CREATE TABLE STATS$SNAPSHOT
    (
      SNAP_ID               NUMBER,
      DBID                  NUMBER,
      INSTANCE_NUMBER       NUMBER,
      SNAP_TIME             DATE,
      STARTUP_TIME          DATE,
      SESSION_ID            NUMBER,
      SERIAL#               NUMBER,
      SNAP_LEVEL            NUMBER,
      UCOMMENT              VARCHAR2(160 BYTE),
      EXECUTIONS_TH         NUMBER,
      PARSE_CALLS_TH        NUMBER,
      DISK_READS_TH         NUMBER,
      BUFFER_GETS_TH        NUMBER,
      SHARABLE_MEM_TH       NUMBER,
      VERSION_COUNT_TH      NUMBER,
      SEG_PHY_READS_TH      NUMBER,
      SEG_LOG_READS_TH      NUMBER,
      SEG_BUFF_BUSY_TH      NUMBER,
      SEG_ROWLOCK_W_TH      NUMBER,
      SEG_ITL_WAITS_TH      NUMBER,
      SEG_CR_BKS_RC_TH      NUMBER,
      SEG_CU_BKS_RC_TH      NUMBER,
      SEG_CR_BKS_SD_TH      NUMBER,
      SEG_CU_BKS_SD_TH      NUMBER,
      SNAPSHOT_EXEC_TIME_S  NUMBER,
      ALL_INIT              VARCHAR2(5 BYTE),
      BASELINE              VARCHAR2(1 BYTE)
    );
    Load my data in the snapshot table $ STATS:
    Insert into STATS$SNAPSHOT
       (SNAP_ID, DBID, INSTANCE_NUMBER, SNAP_TIME, STARTUP_TIME, 
        SESSION_ID, SERIAL#, SNAP_LEVEL, EXECUTIONS_TH, PARSE_CALLS_TH, 
        DISK_READS_TH, BUFFER_GETS_TH, SHARABLE_MEM_TH, VERSION_COUNT_TH, SEG_PHY_READS_TH, 
        SEG_LOG_READS_TH, SEG_BUFF_BUSY_TH, SEG_ROWLOCK_W_TH, SEG_ITL_WAITS_TH, SEG_CR_BKS_RC_TH, 
        SEG_CU_BKS_RC_TH, SNAPSHOT_EXEC_TIME_S, ALL_INIT)
     Values
       (396, 2359907137, 1, TO_DATE('02/09/2012 13:32:26', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('01/05/2012 20:33:22', 'MM/DD/YYYY HH24:MI:SS'), 
        0, 0, 7, 100, 1000, 
        1000, 10000, 1048576, 20, 1000, 
        10000, 100, 100, 100, 1000, 
        1000, 21.92, 'FALSE');
    Insert into STATS$SNAPSHOT
       (SNAP_ID, DBID, INSTANCE_NUMBER, SNAP_TIME, STARTUP_TIME, 
        SESSION_ID, SERIAL#, SNAP_LEVEL, EXECUTIONS_TH, PARSE_CALLS_TH, 
        DISK_READS_TH, BUFFER_GETS_TH, SHARABLE_MEM_TH, VERSION_COUNT_TH, SEG_PHY_READS_TH, 
        SEG_LOG_READS_TH, SEG_BUFF_BUSY_TH, SEG_ROWLOCK_W_TH, SEG_ITL_WAITS_TH, SEG_CR_BKS_RC_TH, 
        SEG_CU_BKS_RC_TH, SNAPSHOT_EXEC_TIME_S, ALL_INIT)
     Values
       (397, 2359907137, 1, TO_DATE('02/09/2012 14:02:39', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('01/05/2012 20:33:22', 'MM/DD/YYYY HH24:MI:SS'), 
        0, 0, 7, 100, 1000, 
        1000, 10000, 1048576, 20, 1000, 
        10000, 100, 100, 100, 1000, 
        1000, 70.49, 'FALSE');
    Insert into STATS$SNAPSHOT
       (SNAP_ID, DBID, INSTANCE_NUMBER, SNAP_TIME, STARTUP_TIME, 
        SESSION_ID, SERIAL#, SNAP_LEVEL, EXECUTIONS_TH, PARSE_CALLS_TH, 
        DISK_READS_TH, BUFFER_GETS_TH, SHARABLE_MEM_TH, VERSION_COUNT_TH, SEG_PHY_READS_TH, 
        SEG_LOG_READS_TH, SEG_BUFF_BUSY_TH, SEG_ROWLOCK_W_TH, SEG_ITL_WAITS_TH, SEG_CR_BKS_RC_TH, 
        SEG_CU_BKS_RC_TH, SNAPSHOT_EXEC_TIME_S, ALL_INIT)
     Values
       (398, 2359907137, 1, TO_DATE('02/09/2012 14:35:03', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('01/05/2012 20:33:22', 'MM/DD/YYYY HH24:MI:SS'), 
        0, 0, 7, 100, 1000, 
        1000, 10000, 1048576, 20, 1000, 
        10000, 100, 100, 100, 1000, 
        1000, 14.28, 'FALSE');
    Insert into STATS$SNAPSHOT
       (SNAP_ID, DBID, INSTANCE_NUMBER, SNAP_TIME, STARTUP_TIME, 
        SESSION_ID, SERIAL#, SNAP_LEVEL, EXECUTIONS_TH, PARSE_CALLS_TH, 
        DISK_READS_TH, BUFFER_GETS_TH, SHARABLE_MEM_TH, VERSION_COUNT_TH, SEG_PHY_READS_TH, 
        SEG_LOG_READS_TH, SEG_BUFF_BUSY_TH, SEG_ROWLOCK_W_TH, SEG_ITL_WAITS_TH, SEG_CR_BKS_RC_TH, 
        SEG_CU_BKS_RC_TH, SNAPSHOT_EXEC_TIME_S, ALL_INIT)
     Values
       (399, 2359907137, 1, TO_DATE('02/09/2012 17:02:22', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('02/09/2012 15:24:06', 'MM/DD/YYYY HH24:MI:SS'), 
        0, 0, 7, 100, 1000, 
        1000, 10000, 1048576, 20, 1000, 
        10000, 100, 100, 100, 1000, 
        1000, 15.92, 'FALSE');
    Insert into STATS$SNAPSHOT
       (SNAP_ID, DBID, INSTANCE_NUMBER, SNAP_TIME, STARTUP_TIME, 
        SESSION_ID, SERIAL#, SNAP_LEVEL, EXECUTIONS_TH, PARSE_CALLS_TH, 
        DISK_READS_TH, BUFFER_GETS_TH, SHARABLE_MEM_TH, VERSION_COUNT_TH, SEG_PHY_READS_TH, 
        SEG_LOG_READS_TH, SEG_BUFF_BUSY_TH, SEG_ROWLOCK_W_TH, SEG_ITL_WAITS_TH, SEG_CR_BKS_RC_TH, 
        SEG_CU_BKS_RC_TH, SNAPSHOT_EXEC_TIME_S, ALL_INIT)
     Values
       (400, 2359907137, 1, TO_DATE('02/09/2012 17:32:21', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('02/09/2012 15:24:06', 'MM/DD/YYYY HH24:MI:SS'), 
        0, 0, 7, 100, 1000, 
        1000, 10000, 1048576, 20, 1000, 
        10000, 100, 100, 100, 1000, 
        1000, 2.77, 'FALSE');
    Insert into STATS$SNAPSHOT
       (SNAP_ID, DBID, INSTANCE_NUMBER, SNAP_TIME, STARTUP_TIME, 
        SESSION_ID, SERIAL#, SNAP_LEVEL, EXECUTIONS_TH, PARSE_CALLS_TH, 
        DISK_READS_TH, BUFFER_GETS_TH, SHARABLE_MEM_TH, VERSION_COUNT_TH, SEG_PHY_READS_TH, 
        SEG_LOG_READS_TH, SEG_BUFF_BUSY_TH, SEG_ROWLOCK_W_TH, SEG_ITL_WAITS_TH, SEG_CR_BKS_RC_TH, 
        SEG_CU_BKS_RC_TH, SNAPSHOT_EXEC_TIME_S, ALL_INIT)
     Values
       (401, 2359907137, 1, TO_DATE('02/09/2012 18:02:21', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('02/09/2012 15:24:06', 'MM/DD/YYYY HH24:MI:SS'), 
        0, 0, 7, 100, 1000, 
        1000, 10000, 1048576, 20, 1000, 
        10000, 100, 100, 100, 1000, 
        1000, 1.72, 'FALSE');
    COMMIT;

    Hello

    Sky13 wrote:
    OK I got it to work,

    I'm glad that you guessed it work. When I tried to run your query later, I got an error. On line 7, I think you meant

     when lag(SS.STARTUP_TIME) over (order by SS.SNAP_ID) !=  SS.STARTUP_TIME then 'YES'
    

    This site do not display the <>inequality operator. When you post here, always use the other, equivalent more!, =.
    When I fix it, I don't get 'no rows selected '.

    but it's ugly! Any ideas on simplification it?

    It's a little shorter, but still pretty ugly:

    WITH     got_wait_time_grp    AS
    (
         SELECT     snap_id
         ,     wait_count
         ,     CASE
                  WHEN  wait_time_milli <= 7
                  THEN  '<= 7'
                  ELSE  '> 7'
              END     AS wait_time_grp
         FROM    stats$event_histogram
         WHERE     event_id     = 2652584166
    )
    ,     grouped_data     AS
    (
         SELECT       ss.snap_id
         ,       ss.snap_time
         ,       eh.wait_time_grp
         ,       CASE
                    WHEN  ss.startup_time != LAG (ss.startup_time) OVER ( PARTITION BY  eh.wait_time_grp
                                                                              ORDER BY         ss.snap_id
                                                   )
                    THEN  'YES'
                    ELSE  'NO'
                END                              AS db_restart
         ,       SUM (eh.wait_count) - LAG ( SUM (eh.wait_count)
                                             , 1
                                 , 0
                                 ) OVER ( PARTITION BY  ss.startup_time
                                             ,                    eh.wait_time_grp
                                             ORDER BY          ss.snap_id
                                     )              AS wait_dif
         ,       DENSE_RANK () OVER (ORDER BY ss.snap_id)     AS dr
         FROM      stats$snapshot      ss
         ,       got_wait_time_grp       eh
         WHERE       ss.snap_id           = eh.snap_id
         AND       ss.snap_id           BETWEEN 396
                                AND      401
         GROUP BY  GROUPING SETS ( (ss.snap_id, ss.snap_time, ss.startup_time, eh.wait_time_grp)
                                   , (ss.snap_id, ss.snap_time, ss.startup_time)
                        )
    )
    SELECT       snap_id, snap_time, db_restart
    ,       MIN (CASE WHEN wait_time_grp = '<= 7' THEN wait_dif END)     AS wait_count_le_7ms
    ,       MIN (CASE WHEN wait_time_grp = '> 7'  THEN wait_dif END)     AS wait_count_gt_7ms
    ,       MIN (CASE WHEN wait_time_grp IS NULL  THEN wait_dif END)     AS total_wait_count
    ,       MIN (CASE WHEN wait_time_grp = '<= 7' THEN wait_dif END) * 100
         / MIN (CASE WHEN wait_time_grp IS NULL  THEN wait_dif END)     AS wait_count_percent_le_7ms
    ,       MIN (CASE WHEN wait_time_grp = '> 7'  THEN wait_dif END) * 100
         / MIN (CASE WHEN wait_time_grp IS NULL  THEN wait_dif END)     AS wait_count_percent_gt_7ms
    FROM       grouped_data
    WHERE       dr     > 1
    GROUP BY  snap_id, snap_time, db_restart
    ORDER BY  snap_id
    ;
    

    Output:

    `                                                        WAIT_   WAIT_
                                     WAIT_   WAIT_          COUNT_  COUNT_
                             DB_    COUNT_  COUNT_  TOTAL_ PERCENT PERCENT
    SNAP                     RE        LE_     GT_   WAIT_    _LE_    _GT_
     _ID SNAP_TIME           START     7MS     7MS   COUNT     7MS     7MS
    ---- ------------------- ----- ------- ------- ------- ------- -------
     397 2/9/2012 2:02:39 PM NO       3311   16261   19572   16.92   83.08
     398 2/9/2012 2:35:03 PM NO      10040   11499   21539   46.61   53.39
     399 2/9/2012 5:02:22 PM YES    111137  113916  225053   49.38   50.62
     400 2/9/2012 5:32:21 PM NO       5880    5047   10927   53.81   46.19
     401 2/9/2012 6:02:21 PM NO       1342    3004    4346   30.88   69.12
    
  • Run the second sql statement only if the first sql statement is set to zero.

    Hey guys I seem to have a mental block here. I have two sql statements. I would like to than the second to run only if the first sql statement is set to zero. I know that I can use PLsql but I would really like to see if I can do this with sql upward. Your answers are very much appreciated.
    This is the first sql
      Select     ft.fund_code, 
                 ft.orgn_code, 
                 ft.acct_code, 
                 ft.amount, 
                 fb.owner_pidm, 
                 ft.prog_code      
          from ftrbremb fb , ftcractg ft
          where fb.doc_code = 'TR000038'
          and fb.ftpbport_id = ft.ftpbport_id
    second sql statement
         Select ft.fund_code, 
                 ft.orgn_code, 
                 ft.acct_code, 
                 ft.amount, 
                 fb.owner_pidm, 
                 ft.prog_code      
          from ftrbremb fb , ftcractg ft, ftprexps fx
          where fb.doc_code = 'TR000038'
          --and fb.ftpbport_id = ft.ftpbport_id
          and fx.ftrbremb_id = fb.id
          and ft.ftprexps_id = fx.id;
    How can I combine these two statements together so that when the first is null the second run. As a bonus, I want to get just the first line as well.
    Any help would be greatly appreciated. I tried to accomplish with the case statement but it dosent everything seems to work for me.
    Thank you

    Miguel,

    the idea is simple: join the two queries (via the union of all) and to change the second part as to return only the rows if the first query returns no rows by changing the NOT EXISTS (first request). Hope I made it clear... ;)

  • How to run the function body that is stored in the variable string?

    Hello!

    Let's say we have a function body stored in the string variable, like this:

    ......

    ......

    var body: String = "public function display_message(kom:String):void {mx.controls.Alert.show (kom) ;};

    .....

    Here, I would like to do something with variable 'body' to run the code in this variable, is - it possible?

    ......

    ......

    With regard to the bars.

    d.Eval can do what you want. check it out at http://www.riaone.com/products/deval/index.html

  • This operation is limited by the administrator of the error when you run the command get-stats

    I have a script that use to collect monthly performance report - but after the upgrade of the CR, the script fails with the error below

    Get-Stat, this operation is limited by the administrator - "vpxd.stats.maxQueryMetrics". Contact your system administrator.

    I tried after the Ko -https://kb.vmware.com/kb/2107096 , but I don't see the webclient service performance

    Please notify

    As you use the API and not the Web Client, you need only modify the value in the advanced settings of vCenter.

    This can be done with

    Note that the value of-1 disables the limit altogether.

    The default value is 64.

    Get-AdvancedSetting - YourvCenter of the entity-name config.vpxd.stats.MaxQueryMetrics |

    Game-AdvancedSetting - value - 1

  • Run the function of the stadium of as a file

    Hello guys,.

    I make a game in action script.

    I have the regular scene (stage) with functions of ActionScript, game initialization etc.,

    and external AS files with (assigned to some clip) works

    Can I perform the function which is on the stage of this folder?

    I tried this:

    var host: MovieClip = MovieClip (this.parent.parent);
    main.increaseScore ();

    this.parent.removeChild (this);

    It workes inside a movieclip, but not in the external file (CLASS)...

    Thank you very much!

    use that newly created class as a class Document (you can set it by clicking on the empty stage and passage to the properties pane, there are small field with a pen top, put the name of your class without the .as endpoint and your file should work.

  • Check if the layer is visible and run a function according to the answer

    Hey guys,.

    I have a question that has been racking my brain these days.

    If I want to run a script when I press a button that will check if a specific layer is visible. If so, it performs another function that shows additional layers. If the specific layer is not visible, it checks the next layer to see if it is visible. This continues until it checks all the necessary layers and is a visible layer.

    Here's the script in question:

    #target photoshop

    //

    clthTopTt.jsx

    //

    cTID = function (s) {return app.charIDToTypeID (s) ;};}

    sTID = function (s) {return app.stringIDToTypeID (s) ;};}

    //

    //==================== actnStd ==============

    //

    function checkactnStd() {}

    Select

    function step 1 (enabled, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    Ref1.putName (cTID ("'Lyr"), "actnStd");

    DESC1.putReference (cTID ('null'), ref1);

    DESC1.putBoolean (cTID ('MkVs'), false);

    var list1 = new ActionList();

    List1.putInteger (17011);

    DESC1.putList (list1, cTID ('LyrI'));

    executeAction (desc1 cTID ('slct'), dialogMode);

    };

    If

    step2 function (activated, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    DESC1.putEnumerated (cTID ('null'), ('Cndt') cTID, cTID ('Ahsvs'));

    var ref1 = new ActionReference();

    Ref1.putName (cTID ('Actn'), 'select actnStd');     <-if the actnStd layer is visible, rather than performing this action, it runs the function selectactnStd().

    Ref1.putName (cTID ('ASet'), 'clthTopTt');

    DESC1.putReference (cTID ('then'), ref1);

    ref2 var = new ActionReference();

    ref2.putName (cTID ('Actn'), "check actnWlk");  <-if the actnStd layer is NOT visible, it executes the next layer checks (via the function checkactnWlk(). )

    ref2.putName (cTID ('ASet'), 'clthTopTt');

    DESC1.putReference (cTID ('else'), ref2);

    executeAction (desc1 sTID ('conditional'), dialogMode);

    };

    Step1();      Select

    Step2();      If

    };

    function selectactnStd() {}

    Show

    function step 1 (enabled, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var list1 = new ActionList();

    var ref1 = new ActionReference();

    Ref1.putName (cTID ("'Lyr"), "topStdTt");

    Ref1.putName (cTID ("'Lyr"), "topMskStd");

    List1.putReference (Ref1);

    DESC1.putList (list1, cTID ('null'));

    executeAction (cTID ("'Shw"), desc1, dialogMode);

    };

    Hide

    step2 function (activated, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var list1 = new ActionList();

    var ref1 = new ActionReference();

    Ref1.putName (cTID ("'Lyr"), "topWlkTt");

    Ref1.putName (cTID ("'Lyr"), "topMskWlk");

    Ref1.putName (cTID ("'Lyr"), "topRunTt");

    Ref1.putName (cTID ("'Lyr"), "topMskRun");

    List1.putReference (Ref1);

    DESC1.putList (list1, cTID ('null'));

    executeAction (desc1 cTID ("Hd"), dialogMode);

    };

    Step1();      Show

    Step2();      Hide

    };

    //

    //==================== actnWlk ==============

    //

    function checkactnWlk() {}

    Select

    function step 1 (enabled, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    Ref1.putName (cTID ("'Lyr"), "actnWlk");

    DESC1.putReference (cTID ('null'), ref1);

    DESC1.putBoolean (cTID ('MkVs'), false);

    var list1 = new ActionList();

    List1.putInteger (17012);

    DESC1.putList (list1, cTID ('LyrI'));

    executeAction (desc1 cTID ('slct'), dialogMode);

    };

    If

    step2 function (activated, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    DESC1.putEnumerated (cTID ('null'), ('Cndt') cTID, cTID ('Ahsvs'));

    var ref1 = new ActionReference();

    Ref1.putName (cTID ('Actn'), 'select actnWlk');

    Ref1.putName (cTID ('ASet'), 'clthTopTt');

    DESC1.putReference (cTID ('then'), ref1);

    ref2 var = new ActionReference();

    ref2.putName (cTID ('Actn'), "check actnRun");

    ref2.putName (cTID ('ASet'), 'clthTopTt');

    DESC1.putReference (cTID ('else'), ref2);

    executeAction (desc1 sTID ('conditional'), dialogMode);

    };

    Step1();      Select

    Step2();      If

    };

    function selectactnWlk() {}

    Show

    function step 1 (enabled, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var list1 = new ActionList();

    var ref1 = new ActionReference();

    Ref1.putName (cTID ("'Lyr"), "topWlkTt");

    Ref1.putName (cTID ("'Lyr"), "topMskWlk");

    List1.putReference (Ref1);

    DESC1.putList (list1, cTID ('null'));

    executeAction (cTID ("'Shw"), desc1, dialogMode);

    };

    Hide

    step2 function (activated, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var list1 = new ActionList();

    var ref1 = new ActionReference();

    Ref1.putName (cTID ("'Lyr"), "topStdTt");

    Ref1.putName (cTID ("'Lyr"), "topMskStd");

    Ref1.putName (cTID ("'Lyr"), "topRunTt");

    Ref1.putName (cTID ("'Lyr"), "topMskRun");

    List1.putReference (Ref1);

    DESC1.putList (list1, cTID ('null'));

    executeAction (desc1 cTID ("Hd"), dialogMode);

    };

    Step1();      Show

    Step2();      Hide

    };

    //

    //==================== actnRun ==============

    //

    function checkactnRun() {}

    Select

    function step 1 (enabled, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    Ref1.putName (cTID ("'Lyr"), "actnRun");

    DESC1.putReference (cTID ('null'), ref1);

    DESC1.putBoolean (cTID ('MkVs'), false);

    var list1 = new ActionList();

    List1.putInteger (17013);

    DESC1.putList (list1, cTID ('LyrI'));

    executeAction (desc1 cTID ('slct'), dialogMode);

    };

    If

    step2 function (activated, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    DESC1.putEnumerated (cTID ('null'), ('Cndt') cTID, cTID ('Ahsvs'));

    var ref1 = new ActionReference();

    Ref1.putName (cTID ('Actn'), 'select actnRun');

    Ref1.putName (cTID ('ASet'), 'clthTopTt');

    DESC1.putReference (cTID ('then'), ref1);

    ref2 var = new ActionReference();

    ref2.putName (cTID ('Actn'), "check actnAc");

    ref2.putName (cTID ('ASet'), 'clthTopTt');

    DESC1.putReference (cTID ('else'), ref2);

    executeAction (desc1 sTID ('conditional'), dialogMode);

    };

    Step1();      Select

    Step2();      If

    };

    function selectactnRun() {}

    Show

    function step 1 (enabled, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var list1 = new ActionList();

    var ref1 = new ActionReference();

    Ref1.putName (cTID ("'Lyr"), "topRunTt");

    Ref1.putName (cTID ("'Lyr"), "topMskRun");

    List1.putReference (Ref1);

    DESC1.putList (list1, cTID ('null'));

    executeAction (cTID ("'Shw"), desc1, dialogMode);

    };

    Hide

    step2 function (activated, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var list1 = new ActionList();

    var ref1 = new ActionReference();

    Ref1.putName (cTID ("'Lyr"), "topStdTt");

    Ref1.putName (cTID ("'Lyr"), "topMskStd");

    Ref1.putName (cTID ("'Lyr"), "topWlkTt");

    Ref1.putName (cTID ("'Lyr"), "topMskWlk");

    List1.putReference (Ref1);

    DESC1.putList (list1, cTID ('null'));

    executeAction (desc1 cTID ("Hd"), dialogMode);

    };

    Step1();      Show

    Step2();      Hide

    };

    After he checks the last layer, then end the script.

    'clthTopTtLoop.jsx '.

    EXPRESSIONS OF FOLKLORE

    Any help is appreciated seriously. Thank you guys!

    Hey guys, I promised that I would update this post to help others if I got the answer, so here:

    Firstly, the developer has created a function to automatically get the layer. I had problems to find ways to select layers, especially because the layers were nested in groups inside groups. This helped solve that. The function was this:

    function selectLayer(name) {
      var desc = new ActionDescriptor();
      var ref = new ActionReference();
      ref.putName( charIDToTypeID('Lyr '), name );
      desc.putReference( charIDToTypeID('null'), ref );
      desc.putBoolean( charIDToTypeID('MkVs'), false );
      executeAction( charIDToTypeID('slct'), desc, DialogModes.NO );
      return
    };
    

    Then call the layer using layer real name (assuming that your layer names are unique. If they aren't, you'll find yourself only to select the first layer with the same specific name) throughout your script file.

    IE. In my case, selectLayer ("actnStd"); or selectLayer ("actnWlk");

    You then set the visibility by using the following code:

    // show
    app.activeDocument.activeLayer.visible = true;
    // hide
    app.activeDocument.activeLayer.visible = false;
    

    Then use a function to check whether a layer is visible. If the layer is visible, you run the function show/hide layers respective:

    function CheckactnWlk() {
      selectLayer("actnWlk");
      if  (app.activeDocument.activeLayer.visible == true) {
      SelectactnWlk()
      }
      else  {
      CheckactnRun();
      }
    };
    

    So in the end, the final script looks like this:

    #target photoshop
    
    app.bringToFront();
    CheckactnStd();
    
    function CheckactnStd() {
      selectLayer("actnStd");
      if  (app.activeDocument.activeLayer.visible == true) {
      SelectactnStd()
      }
      else  {
      CheckactnWlk();
      }
    };
    
    function SelectactnStd() {
      selectLayer("topMskStd");
      app.activeDocument.activeLayer.visible = true;
    
      selectLayer("topStdTt");
      app.activeDocument.activeLayer.visible = true;
    
      selectLayer("topWlkTt");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topMskWlk");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topRunTt");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topMskRun");
      app.activeDocument.activeLayer.visible = false;
    }; 
    
    function CheckactnWlk() {
      selectLayer("actnWlk");
      if  (app.activeDocument.activeLayer.visible == true) {
      SelectactnWlk()
      }
      else  {
      CheckactnRun();
      }
    };   
    
    function SelectactnWlk() {
      selectLayer("topMskStd");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topStdTt");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topWlkTt");
      app.activeDocument.activeLayer.visible = true;
    
      selectLayer("topMskWlk");
      app.activeDocument.activeLayer.visible = true;
    
      selectLayer("topRunTt");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topMskRun");
      app.activeDocument.activeLayer.visible = false;
    
    };
    
    function CheckactnRun() {
      selectLayer("actnRun");
      if  (app.activeDocument.activeLayer.visible == true) {
      SelectactnRun()
      }
      else  {
      alert ('There is no Selected Layer', 'Please select a layer', 0);
      }
    };
    
    function SelectactnRun() {
      selectLayer("topMskStd");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topStdTt");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topWlkTt");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topMskWlk");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topRunTt");
      app.activeDocument.activeLayer.visible = true;
    
      selectLayer("topMskRun");
      app.activeDocument.activeLayer.visible = true;
    
    };
    
    function selectLayer(name) {
            var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putName( charIDToTypeID('Lyr '), name );
           desc.putReference( charIDToTypeID('null'), ref );
           desc.putBoolean( charIDToTypeID('MkVs'), false );
           executeAction( charIDToTypeID('slct'), desc, DialogModes.NO );
           return
    };
    
    app.preferences.rulerUnits = rUnit;
    app.preferences.typeUnits = tUnit;
    
    selectLayer("actnStd");
    

    Guys good luck! Now to find how to select random layers via the script.

  • Grant permission to select the function but not executed in a PL/SQL block

    Hello.

    I know that there are only two permissions on procedures/functions - RUN and DEBUG.

    But I want to grant EXECUTE permissions for a user so that the user can Select the function to double or to any other request, but not to run(to prevent the user to trigger the update of LMD - insertion, etc.) inside a BEGIN-END block.

    I know that we can revoke access to tables etc. But that access has to give. The user must be able to perform the DML operation, but just not through a function.

    Can someone please help?

    I know that there are only two permissions on procedures/functions - RUN and DEBUG.

    Fix - so give one or both of those who depend on your use case.

    
    But I want to grant the EXECUTE permission to a user in such a way that the user can select the function using dual or any other query but not execute( to prevent the user from firing DMLs - Insert, update etc) inside any BEGIN-END block.
     
    

    You already know that there is NO "select" privileges for functions. a query such as "select the function of double" RUNS the function. That's all what you can do with the functions is execute them.

    I know that we can revoke access to tables etc. But that access has to be given. The user should be able to do perform DML operation, but just not through a function.
    

    Then revoke execute on the service. Then the user cannot run the service either directly or in the context of a dml statement.

  • Is it possible to pass an argument to the function triggered by an event handler?

    Hi all
    Try to migrate my way of thinking in AS2 to AS3/CS4.
    OK, I have 2 buttons on the stage. Each button almost did the same thing, so I want to create a unique function, and each button calls this function even (we'll name this function 'Navigate')... However, the function will have to end up doing something different dependent on which button was clicked.
    If, previously, in AS2, I would have added the code on the buttons themselves with methods we (release) (see the SAMPLE CODE 1)

    Thus, each button calls the function efficiently navigate and transmits a different image to the function tag.
    Now, I try to recreate this feature in AS3. As you know, it (release) has been abolished (still do not know why), but we must now use event handlers, so I'll try to find a way to pass a different image to the function label argument to navigate. Currently, I can achieve that by using a switch statement to test which button has been clicked and act accordingly (see the SAMPLE CODE 2).

    In this simplistic example, this works very well, but in the real world, I have more than 2 buttons and the function navigate would probably much more complicated...
    So I would be able to pass an argument (as in the AS2 example) to the function to navigate... maybe in the addEventListener() method? I tried, but got compile errors (see the EXAMPLE CODE 3):

    The issue of the $ 1 Million:
    Is it possible to pass/change dynamically an argument to a function that is triggered by an event listener? (Or is the event that triggered the function the only argument you have?)
    If this is not possible, I would like to hear how you people it would handle (other than to have a switch with 12 cases in there)?

    I found a few solutions that I'll post below for prosperity...

    You can create a dictionary indexed by the targets of future events and store information in there you want to associate with them. Then the Navigate function check that the dictionary to get its parameters:

    Code.
    Button1.addEventListener (MouseEvent.CLICK, navigate, false, 0, true);
    Button2.addEventListener (MouseEvent.CLICK, navigate, false, 0, true);

    var buttonArgs:Dictionary = new Dictionary();
    buttonArgs [Button1] = "FrameLabel1";
    buttonArgs [Button2] = "FrameLabel2";

    function Navigate(e:MouseEvent):void {}
    gotoAndStop (buttonArgs [e.target]);
    }

    This to me, is about the same amount of work than writing a long, but a bit more elegant switch statement, I guess.

    I had a little trouble understanding the following solution, because I did not quite understand important information about event listeners. The addEventListener () method requires a function as the 2nd argument passed to it.
    It didn't quite click on until someone reminded me: Navigate is a function... Navigate("FrameLabel1") is a callfunction...

    So by writing simply navigate, I'm not actually calling the function when calling the addEventListener method, I'm just providing the event with a reference the name listener. Then, when the listener is triggered, the listener will call (and pass a MouseEvent argument to) navigate the function.

    Conversely, by writing Navigate("FrameLabel1") as 2nd argument, the event listener trys to run the function navigate both the addEventListener method is instantiated. And, since then, in this example, the function navigate returned as ": Sub" a compilation error would occur because as I said, an event listener requires a function as 2nd argument data type. This would be essentially as written addEventListener (MouseEvent.Click, Sub, false, 0, true)
    However, there is a way to get around this... basically, instead of setting the function navigate as returning an empty data type, you define a function to return data type and then nest another function (which actually contains the actions you want to run) on the inside.

    Button1.addEventListener (MouseEvent.CLICK, Navigate ("FrameLabel1"), false, 0, true);
    Button2.addEventListener (MouseEvent.CLICK, Navigate ("FrameLabel2"), false, 0, true);

    function Navigate(myLabel:String):Function {}
    return function(evt:MouseEvent):void {}
    gotoAndStop (myLabel);
    }
    }

  • ORA-00904 during execution of the functions and procedures (IDE version 4.1.0.19)

    Recently, I updated my Oracle SQL Developer to the latest version (see below) and now when I try to run the function or procedure of the IDE, I had an alert with the error: "ORA-00904:"OBJECT_ID": invalid identifier." Code provider 904 ". Previous version of IDE works pretty well. What is the problem?

    Oracle SQL Developer 4.1.0.19

    Version 4.1.0.19

    Build a HAND - 19.07

    It seems that OBJECT_ID added to ALL_PROCEDURES for the 10g DB version, but after the version you have (10.2.0.1.0).  I don't have a link to the documentation specific to hand Oracle, but see the last comment by Steven Feuerstein in the next blog...

    PL/SQL challenge: ALL_PROCEDURES changes over version (5980)

    Typically when generation SQL for a particular version of the DB with SQL Developer, only major (10) and (more rarely) secondary numbers (2) gets checked, if your problem is one of those borderline cases that are easy to miss and less likely to get fixed. Whenever a customer has a specific need to use an older version, Oracle expects usually only the last set of patch (for example, 10.2.0.5) would be used.

  • Consider the function result Cache

    Hello

    Have a question about the function result to cache.

    Follow this link: http://www.oracle.com/technetwork/articles/sql/11g-caching-pooling-088320.html

    I use the following version of oracle: Oracle Database 11g Express Edition Release 11.2.0.2.0

    I'm doing using the feature of function result cache.

    Please find the source code used, below:

    create or replace function fnresultcahceg (empid employees.employee_id%type)

    employees.salary%type result_cache relies_on (employees) is back

    l_salary employees.salary%type;

    Start

    Select the wage in l_salary of employees where employee_id = empid;

    DBMS_LOCK. Sleep (1);

    Return l_salary;

    end fnresultcahceg;

    Try to run the function created above with the following:

    SQL > select fnresultcahceg (200) double;

    FNRESULTCAHCEG (200)

    -------------------

    4400

    Elapsed time: 00:00:01.15

    SQL > select fnresultcahceg (201) twice;

    FNRESULTCAHCEG (201)

    -------------------

    13000

    Elapsed time: 00:00:01.01

    SQL > select fnresultcahceg (200) double;

    FNRESULTCAHCEG (200)

    -------------------

    4400

    Elapsed time: 00:00:01.00

    SQL > select fnresultcahceg (201) twice;

    FNRESULTCAHCEG (201)

    -------------------

    13000

    Elapsed time: 00:00:01.01

    SQL > select fnresultcahceg (201) twice;

    FNRESULTCAHCEG (201)

    -------------------

    13000

    Elapsed time: 00:00:01.00

    SQL > exec dbms_output.put_line (fnresultcahceg (200));

    4400

    PL/SQL procedure successfully completed.

    Elapsed time: 00:00:01.04

    SQL > exec dbms_output.put_line (fnresultcahceg (201)).

    13000

    PL/SQL procedure successfully completed.

    Elapsed time: 00:00:01.03

    SQL > exec dbms_output.put_line (fnresultcahceg (201)).

    13000

    PL/SQL procedure successfully completed.

    Elapsed time: 00:00:01.01

    SQL > exec dbms_output.put_line (fnresultcahceg (201)).

    13000

    PL/SQL procedure successfully completed.

    Elapsed time: 00:00:01.00

    SQL > exec dbms_output.put_line (fnresultcahceg (201)).

    13000

    PL/SQL procedure successfully completed.

    Elapsed time: 00:00:01.00

    SQL > exec dbms_output.put_line (fnresultcahceg (201)).

    13000

    PL/SQL procedure successfully completed.

    Elapsed time: 00:00:01.01

    SQL > spool off;

    We could see no improvement in time elapsed execution.

    Have a doubt on the am I missed something / do wrong to the result of the setting of the cache settings.

    Have you tried with the following result cache settings

    ALTER SYSTEM SET result_cache_max_size = 2M RANGE = MΘMOIRE

    ALTER SYSTEM SET result_cache_remote_expiration = 2;

    ALTER SYSTEM SET result_cache_mode = {MANUAL |} STRENGTH} - two similar agronomic results

    The wait was to reduce the execution time after its first execution if the data remains the same.

    Please guide me in this regard.

    Thanks in advance,

    Sandeep.S

    > I use the next version of oracle: Oracle Database 11g Express Edition Release 11.2.0.2.0.

    PL/SQL function result Cache is only available in Oracle Database Enterprise Edition (EE).

    Concerning

  • Calling the function from inside a onEnterFrame action

    I have a class file called MonsterGame. Inside her, one of the methods that are called "queueAnim" creates a onEnterFrame function to wait until the current film is play before making the following visible.

    That works fine, but I have certain conditions that the Main() function is called just after a certain movie is played (called "eatMovie"). Everything works except the call to Main();

    I think it's a problem with SEO in the wrong place, but I don't know why.

    The trace for "this should be the root name" returns "MonsterGame", which is the name of the class where the Main() method. So if this ._name returns MonsterGame and MonsterGame has Main() inside, why used Main() or that. Main() run the function?

    PS: It's NOT because I remove the onEnterFrame before calling the Main(), at least I'm sure it's not because I put a trace here, and it works very well, proving that after deleting lines are always executed.

    PM me if you want the link to the source code and swf file

    Try the attached code. If not post a link to a zip with all the files.

Maybe you are looking for