A query regarding synchronised functions, using shared object

Hi all.
I have this little query, regarding the functions that are synchronised, based on accessing the lock to the object, which is being used for synchronizing.
Ok, I will clear myself with the following example :
class First
int a;
static int b;
public void func_one()
synchronized((Integer) a)
{ // function logic
} // End of func_one
public void func_two()
synchronized((Integer) b)
{ / function logic
} // End of func_two
public static void func_three()
synchronized((Integer) a)
{ // function logic
} // End of func_three, WHICH IS ACTUALLY NOT ALLOWED,
// just written here for completeness.
public static void func_four()
synchronized((Integer) b)
{ / function logic
} // End of func_four
First obj1 = new First();
First obj2 = new First();
Note that the four functions are different on the following criteria :
a) Whether the function is static or non-static.
b) Whether the object on which synchronization is based is a static, or a non-static member of the class.
Now, first my-thoughts; kindly correct me if I am wrong :
a) In case 1, we have a non-static function, synchronized on a non-static object. Thus, effectively, there is no-synchronisation, since in case obj1 and obj2 happen to call the func_one at the same time, obj1 will obtain lock for obj1.a; and obj2 will obtain lock to obj2.a; and both can go inside the supposed-to-be-synchronized-function-but-actually-is-not merrily.
Kindly correct me I am wrong anywhere in the above.
b) In case 2, we have a non-static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a. However, since obj1.a and obj2.a are the same, thus we will indeed obtain sychronisation.
Kindly correct me I am wrong anywhere in the above.
c) In case 3, we have a static function , synchronized on a non-static object. However, Java does not allow functions of this type, so we may safely move forward.
d) In case 4, we have a static function, synchronized on a static object.
Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a. However, since obj1.a and obj2.a are the same, thus we will indeed obtain sychronisation. But we are only partly done for this case.
First, Kindly correct me I am wrong anywhere in the above.
Now, I have a query : what happens if the call is made in a classically static manner, i.e. using the statement "First.func_four;".
Another query : so far we have been assuming that the only objects contending for the synchronized function are obj1, and obj2, in a single thread. Now, consider this, suppose we have the same reference obj1, in two threads, and the call "obj1.func_four;" happens to occur at the same time from each of these threads. Thus, we have obj1 rying to obtain lock for obj1.a; and again obj1 trying to obtain lock for obj1.a, which are the same locks. So, if obj1.a of the first thread obtains the lock, then it will enter the function no-doubt, but the call from the second thread will also succeed. Thus, effectively, our synchronisation is broken.
Or am I being dumb ?
Looking forward to replies..
Ashutosh

a) In case 1, we have a non-static function, synchronized on a non-static object. Thus, effectively, there is no-synchronisationThere is no synchronization between distinct First objects, but that's what you specified. Apart from the coding bug noted below, there would be synchronization between different threads using the same instance of First.
b) In case 2, we have a non-static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a.obj1/2 don't call methods or try to obtain locks. The two different threads do that. And you mean First.b, not obj1.b and obj2.b, but see also below.
d) In case 4, we have a static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a.Again, obj1/2 don't call methods or try to obtain locks. The two different threads do that. And again, you mean First.b. obj1.b and obj2.b are the same as First.b. Does that make it clearer?
Now, I have a query : what happens if the call is made in a classically static manner, i.e. using the statement "First.func_four;".That's what happens in any case whether you write obj1.func_four(), obj2.func)four(), or First.func_four(). All these are identical when func_four(0 is static.
Now, consider this, suppose we have the same reference obj1, in two threads, and the call "obj1.func_four;" happens to occur at the same time from each of these threads. Thus, we have obj1 rying to obtain lock for obj1.aNo we don't, we have a thread trying to obtain the lock on First.b.
and again obj1 trying to obtain lock for obj1.aYou mean obj2 and First.b, but obj2 doesn't obtain the lock, the thread does.
which are the same locks. So, if obj1.a of the first thread obtains the lock, then it will enter the function no-doubt, but the call from the second thread will also succeed.Of course it won't. Your reasoning here makes zero sense..Once First.b is locked it is locked. End of story.
Thus, effectively, our synchronisation is broken.No it isn't. The second thread will wait on the same First.b object that the first thread has locked.
However in any case you have a much bigger problem here. You're autoboxing your local 'int' variable to a possibly brand-new Integer object every call, so there may be no synchronization at all.
You need:
Object a = new Object();
static Object b = new Object();

Similar Messages

  • Whats the function used in objective C to change language in an app

    whats the function used in objective C to change language in an app

    No. Actually its a not uncommon practise in iOS. See the app "Where is my Water" for instance. You can freely select what language you want to use in the game.
    Another iOS app where the app does not offer this feature but should is XCom. For me the app uses German text with US-English movies and ingame speech. I would rather have complete english than a language mix, but I cant switch the game. I could swich my ipad to english, then the game would use english. But this would lead to other problems and its not really user friendly.
    Speaking of language support. It is also ok to download languages after installation. After all it is only data, no executable.

  • Using Shared Object Libraries

    How (or what) do we set when using shared object libraries?
    We have Java Native Methods which are implemented using C++ and stored in shared object libraries. We can build our project, but when trying to execute the project, the shared object libraries are not found. We had tried to set the external execution settings to include the library paths, but nothing seems to take affect.
    What do we need to set to run with the shared object libraries?

    RK,
    I appreciate your responce, hopefully we'll get this worked out. I will try to give you as much information as I can so you will hopefully understand the problem.
    We have added a Library Reference to our project - which is a jar file - this jar file contains our Business Objects which are implemented in Java. Within this Library Reference, there is a Java class which has a Native method. The method is implemented in C++ The C++ implementation of this method is within a C++ shared object library (libname.so).
    How do we let Creator know that we need to link in this C++ Shared Object Library at run time?
    The Modifers Properties for the method in the library reference are correctly set - that is they are set to Native. For a method within a java element, selecting or un-selecting this modifier simply changes the method declaration. It does not tell Creator where the actual implementation is (shared object library in this case).
    As originally stated, we tried to include our shared object library in the Execution Property of the properties window for the Java Element. Here is what we have done so far - all unsuccessful....
    Under the External Execution Property - we added the environment variable LD_LIBRARY_PATH set to our shared object library path. We also selected the Append Environment Variable (set to true). We are not able to modify the Library Path of the External Execution Property - it will not allow changes - all buttons are disabled in the pop up window.
    There are no properties for the Internal Execution within the Executor Properties, so there is nothing we can set there.
    We have tried to set the Debugger Execution properties in the same manner as the External Execution properties to run the project in Debug mode - and have the same problem - while executing the project, we get the error message which indicates that our shared object library can not be found.
    There are no property settings available on the J2EE Server Execution Properties to set.
    What do we need to set so that this Shared Object Library will be located during execution of our project under SJSC?
    Thank you for any suggestions you may have.
    --Scott                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Query regarding sys_context function

    Hello
    I have created report with custom folder and parameters are passed using sys_context function. I have few queries regarding this.
    1) How to see actual sql query executed by report. I can see from discover administorator - sql inspector. But it is not showing which is value passed for sys_context parameter. If want to see query with full parameter then what to do? I have also tried to look it from toad - session browser, there also it is not showing parameter value.
    2) If anything special needed to manage sys_context variable. i.e i have executed report with parameter 1 = A and now next time executed with parameter 1 =b. Will it takes proper value, i mean sys_context parameter will be refreshed itself, or need to do somehting..
    Please help me out.
    Thanks in advance

    Hi,
    How to see actual sql query executed by reportSYS_CONTEXT returns values from a namespace. Normally you create a local namespace and values in this namespace can only be retrieved by the session. So there is no way to see the values for a Discoverer session from Toad. Normally, one would create a Discoverer report that returns all the values in your namespace that you can use for debugging.
    If anything special needed to manage sys_context variableNo, once you have set the context in the namespace using DBMS_SESSION.set_context then it is there for the rest of the session.
    Rod West

  • Query regarding oracle functions

    Hi All,
    I ahve been trying to work with decode and NVL to get the following output:
    Value     Output
    NULL     1
    0     1
    1     1
    2     2
    3     3
    for this i have written the below query:
    SELECT DECODE(NVL(high_value,1),0,1,NVL(high_value,1)) from tab1;
    Can there be any alternate to this using other functions?
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE     10.2.0.4.0     Production
    TNS for Solaris: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    Thanks
    Nikhil

    Use CASE
    with t_data as
    select null as val from dual union all
    select 0 from dual union all
    select 1 from dual union all
    select 2 from dual union all
    select 3 from dual
    SELECT
         val,
         CASE
              WHEN  (val IS NULL ) OR ( val    = 0 )
              THEN
                   1
              ELSE
                   val
         END AS output
    FROM
         t_data;
    VAL                    OUTPUT                
                           1                     
    0                      1                     
    1                      1                     
    2                      2                     
    3                      3                     

  • Query regarding Min function with Date

    Dear All,
    I have written query as follows but it is giving me error message.
    Selection CityCode, CityName, Min(Date)
    from Entry
    I want to write a query which should generate minimum date of transactions of city. There are about 50 cities in the Entry table and against each city there are thousands of records, I want to display only the oldest date against each city with its code. In the out put there should 50 rows as there are 50 cities and oldest (min) date. Can any one please help on this SQL.
    Thanks

    Do you want just min date in the table or need grouping by citycode and city name also?
    If just min date of the table is needed, use row_number analytic function to get the min date in the table.

  • Query regarding Date Function

    All,
    Can I know the difference between the following two queries
    select TO_CHAR(TRUNC(sysdate),'dd-mon-rr') from dual;
    select TO_CHAR(TRUNC(sysdate),'dd-mon-yy') from dual;
    However, both the query gives the same result as '03-nov-09'.
    Regards
    ND

    ...of which century?
    SQL> var dt varchar2(10)
    SQL>
    SQL> begin
      2     :dt := '03-11-51';
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select TO_CHAR(to_date (:dt, 'dd-mm-rr'),'dd-mon-yyyy') from dual;
    TO_CHAR(TO_DATE(:DT,
    03-nov-1951
    SQL>
    SQL> select TO_CHAR(to_date (:dt, 'dd-mm-yy'),'dd-mon-yyyy') from dual;
    TO_CHAR(TO_DATE(:DT,
    03-nov-2051Don't use a two digit year...

  • Query regarding FM: K_Hierarchy_Display(used in CK13 trsnction)

    Hi All,
    My reqiurement is to display the BOM details for multiple materials.
    For that I am using the function module 'K_HIERARCHY_DISPLAY'.
    I am passing the table(I_MAT) having the data to be displayed , the program name and the fieldcat table, which are the mandatory parameters.(Please refer the FM below).
    The output which I get is just the hierarchical structure without any header/itemdata(Its only the lines).
    Anyone knows which other parameters should be passed and if yes how?
    Know any other FM for displaying muliple materials with their muliple levels.
    CALL FUNCTION 'K_HIERARCHY_DISPLAY'
        EXPORTING
          i_tabname                          = 'I_MAT'
          i_callback_prg                     = sy-repid
      i_ucomm_form                      = ' '
      i_top_of_page_form               = ' '
      i_display_form                      = ' '
      i_node_insert_form               = ' '
      i_node_move_form                = ' '
      i_status_form                       = ' '
      i_f1_help_form                      = ' '
      i_start_column                      = 5
      i_start_row                           = 0
      i_end_column                       = 75
      i_end_row                            = 20
       i_tabulator                             = 0
       i_length_opti                          = 'X'
      i_compressed                       = ' '
       i_header                                = 'X'
      I_TITLE                                =
      T_FIELDCAT_VIEWS            =
      T_FIELDCAT_VIEWS2          =
      I_VARIANT                           =
        TABLES
          i_table                                = i_mat
          i_field_cat                           = t_fieldcat[]
      T_EXPAND                           =
      T_VIEW_NAMES                  =
      T_VIEW_TABULATORS         =
      T_FIELDGROUPS                 =
    EXCEPTIONS
      TOO_MANY_VIEWS              = 1
      KEY_TOO_LONG                   = 2
      NO_LEVEL_DEFINED            = 3
      WRONG_TREE_STRUCTURE               = 4
      WRONG_NUMBER_OF_ALTERNATIVES       = 5
      OTHERS                             = 6
    Thanks in advance,
    Neethu Mohan

    Hi neethu,
    Instead of using the FM, U can use the class CL_STRUCTURE_EXPLOSION_TREE. It directly displays the BOM tree.
    Get the KEKO key.
      SELECT BZOBJ KALNR KALKA KADKY TVERS BWVAR KKZMA
      UP TO 1 ROWS
      FROM   KEKO
      INTO   L_KEKOKEY
      WHERE  KADKY   = U_KADKY
      AND    MATNR   = U_MATNR
      AND    WERKS   = U_WERKS
      AND    ALDAT   = U_ALDAT
      AND    KLVAR   = U_KLVAR
      AND    TVERS   = U_TVERS
      AND    FEH_STA = U_FESTA.
      ENDSELECT.
      IF SY-SUBRC NE 0.
        MESSAGE S244(25).
        LEAVE LIST-PROCESSING.
      ENDIF.
    Create the BOM Tree - ( WITH CONTAINER )
      CREATE OBJECT C_TREE
        EXPORTING
           IS_KEKOKEY       = L_KEKOKEY
           IX_EXPLODE_RAW   = SPACE
           IX_EXPLODE_BPO   = TRUE
           IX_EXPLODE_KF    = TRUE
           I_VIEW           = U_SICHT       (type CK_SICHT)
           I_PARENT         = U_CNTNR   ( Container where u want to display the tree)
           I_NO_TOOLBAR     = SPACE
           I_NO_HTML_HEADER = TRUE
           I_OBJW           = L_OBJ_CUR
           I_ONLY_M         = TRUE
           I_ALLOW_REP_CALLS = TRUE
        EXCEPTIONS
          KEKO_NOT_FOUND = 1
          others         = 2.
      IF SY-SUBRC NE 0.
        MESSAGE I809(K/).
        LEAVE PROGRAM.
      ENDIF.

  • Query regarding Import Dimensions using Flat File in EPMA

    Hi All,
    I am trying to import dimensions and Dimension properties using a flat text file to the master dimension library. If I try to include any properties (HFM) in the !Members Section, I am getting an error "Input Line ... does not have the expected format of 1 columns". But if I remove the properties and just build the members and hierarchies without any properties definition, I am able to succeed. Can someone guide me on what I might be missing with regards to member properties? Below is the format of the input text file.
    !Section=Dimensions
    'Name,DimensionClass,DimensionAlias,CustomDimensionID
    HFM_Entity,Entity,HFM_Entity,
    !MEMBERS=HFM_Entity
    'Name,Allow Adjustments
    10001000,Y
    10001100,Y
    !HIERARCHIES=HFM_Entity
    'Parent,Child
    Please let me know if any other information is required.
    Cheers,
    HyperionUser

    Hi,
    Have a look in directory \Hyperion\products\Planning\bin\sampleapp
    there is a sample ads file :- SampApp Source Flat File.ads
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Query not executing with "Insufficient Shared Objects Memory Available"

    Hi ,
    We have few Reports on a Multi provider, which are working fine earlier both in Web Analyzer and  Bex Analyzer.
    Now we have created an Entry in the MULTIPROVIDER  Hint table  as we have data based on Fiscal Year in 3 different cubes.
    This went fine in our quality system and even it is working now. The reports worked fine  in Production earlier.
    After the change( moving HInt tables entries) queries are not working and givig an error message.
    But if I exeute the reports in Production I get the above mentioned error message.
    1. Have regenerated the Queries already  in Production.
    2. No changes to the Reports.
    3. No changes to the Multi provider.
    Only change is introduction of an entry in Hint table.The same functaionality which is working in quality system is not working in Production.
    We have same amount of data both in our quality and Production for some set of selections.
    Please share your thoughts/experineces if anyone have worked on this.
    Regards,
    Ganesh Thota.

    Hi,
    Try to inrcrease paramenter abap/shared_objects_size_MB as described in SAP Note 972757.
    BR,
    Walter Oliveira

  • Using shared objects to create bookmarks in a course module

    I'm relatively new to Flash ActionScripting so I'm
    looking for a little help from those who live and breathe the code.
    I've been banging my head around for weeks trying to get this
    function to work in my module (books, tutorials, internet etc...).
    My module is rather simple. Each page of content is it's own .swf
    file. I call up each .swf by programming the navigation buttons
    (Back, Next) with this script:
    //Next button
    on (release) {
    stopAllSounds();
    loadMovie ("1_2.swf",0)
    //The following Next button script would be:
    on (release) {
    stopAllSounds();
    loadMovie ("1_3.swf",0)
    And so on.
    I have approximately 49 .swf files (pages of content) in my
    module approximately 1 1/2 hrs. So you can see why bookmarking is
    important to me as well as my users. If I could get an idea on how
    to create the script on the first .swf and what scripting needs to
    be on the following .swf's it would be greatly appreciated.

    did you manage to solve this? we are looking for the same issue.

  • Query regarding random function

    I am doing a random function this is what i hv done
    static Random svcRand;
    a=svcRand.nextInt();
    its working perfectly but every time a random number is generated its a huge number......How can I keep it within a limit say between 1 and 100 always

    showstopper wrote:
    I am doing a random function this is what i hv done
    static Random svcRand;
    a=svcRand.nextInt(); This code would generate a NullPointerException, but I guess you initialize this somewhere.
    >
    its working perfectly but every time a random number is generated its a huge number......How can I keep it within a limit say between 1 and 100 alwaysThere are two ways
    1. Easy: a = svcRand.nextInt(100) + 1; // number between 1 and 100
    2. More general:
    double start = ...;
    double span = ...;
    double val = svcRand.nextDouble() * span + start;

  • To use Shared Object runtime

    I tried to share a string's value between two application, in
    a way that allow the first one to read a value writed by the second
    one in runtime. It doesn't work!
    The *.sol file is the same, but maybe each application have a
    different copy of this file in the own memory
    Infact refreshing the page is possible obtain a correct
    value.
    This are my SharedObject's instance in the applications:
    var mySO:SharedObject = SharedObject.getLocal("scambio",
    of course in the same domain.
    How can I share data between more application in
    runtime?

    Also not a reply. Same problem. I looked inside my single
    mysterious SOL file and found that each application was updating
    the information, but neither of them would read anything, but what
    they added in. The data from the other application (and for testing
    purposes I used identical code in different directories) was
    ignored, despite the fact I could see that the SOL file had been
    updated.
    Edit: I have noticed that if App1 sets a LSO then App2 can
    read the common LSO data. If, however, App2 then sets the same data
    to something else, App1 wont see the changes. Additionally if I go
    back and repeat App1's setting of the LSO, App2 no longer reads the
    LSO changes. Any help to get App1 and App2 to consistently talk to
    each-other via LSOs would be appreciated.

  • BULK COLLECT in select query inside a function

    Hi All,
    My query is :
    SELECT col1,col2,col3 FROM table_a; --( consider this is a long running query with lot of joins)
    Need to know how can i get the output of the above query from a function using BULK COLLECT.
    and i tried this:
    CREATE OR REPLACE TYPE tab_a_row
    AS OBJECT (
    col1 number(20),
    col2 number(20),
    col2 number(20)) ;
    create or replace type tab_a_nt as table of tab_a_row;
    create or replace function get_table_a
    return sys_refcursor
    is
    tab_a_recs tab_a_nt;
    rv sys_refcursor;
    begin
    SELECT tab_a_row(col1,col2,col3) BULK COLLECT INTO tab_a_recs FROM table_a;
    open rv for select * from table(tab_a_recs);
    return rv;
    end;
    Function created successfully. and i exec this from sql plus using
    SQL> var rc refcursor;
    SQL> exec :rc := get_table_a;
    BEGIN :rc := get_table_a; END;
    ERROR at line 1:
    ORA-22905: cannot access rows from a non-nested table item
    ORA-06512: at "GET_TABLE_A", line 12
    ORA-06512: at line 1
    Kindly share your ideas on how to use bulk collect and get set of outputs from a function.
    Edited by: 887268 on Apr 18, 2013 3:10 AM

    >
    If i use refcursor , then the JAVA code needs to be changed accordinglyto get the refcursor output.
    >
    Well, of course. Java has to know what the sql projection is. How else will it know how many columns there are and their datatypes.
    But that is true no matter what method you use.
    >
    But if i use a PLSQL COLLECTION TYPE (nested tables ) , then i can get output as ,
    select * from table(function_name(input1,input2));
    >
    No - using the 'table' function mean you are calling a PIPELINED function.
    This is a sample of a PIPELINED procedure.
    -- type to match emp record
    create or replace type emp_scalar_type as object
      (EMPNO NUMBER(4) ,
       ENAME VARCHAR2(10),
       JOB VARCHAR2(9),
       MGR NUMBER(4),
       HIREDATE DATE,
       SAL NUMBER(7, 2),
       COMM NUMBER(7, 2),
       DEPTNO NUMBER(2)
    -- table of emp records
    create or replace type emp_table_type as table of emp_scalar_type
    -- pipelined function
    create or replace function get_emp( p_deptno in number )
      return emp_table_type
      PIPELINED
      as
       TYPE EmpCurTyp IS REF CURSOR RETURN emp%ROWTYPE;
        emp_cv EmpCurTyp;
        l_rec  emp%rowtype;
      begin
        open emp_cv for select * from emp where deptno = p_deptno;
        loop
          fetch emp_cv into l_rec;
          exit when (emp_cv%notfound);
          pipe row( emp_scalar_type( l_rec.empno, LOWER(l_rec.ename),
              l_rec.job, l_rec.mgr, l_rec.hiredate, l_rec.sal, l_rec.comm, l_rec.deptno ) );
        end loop;
        return;
      end;
    select * from table(get_emp(20))Or your function could return a collection like the example from this thread this morning.
    Example of Collection as datatype of a function’s return value
    CREATE OR REPLACE TYPE enamelist as VARRAY(20) of VARCHAR2(20)
    /* Formatted on 4/18/2013 4:06:47 PM (QP5 v5.126.903.23003) */
    CREATE OR REPLACE FUNCTION ename_fn
    RETURN enamelist
    AS
    v_cursor_main enamelist := enamelist ();
    BEGIN
    SELECT ename
    BULK COLLECT
    INTO v_cursor_main
    FROM emp;
    RETURN v_cursor_main;
    EXCEPTION
    WHEN OTHERS
    THEN
    RETURN v_cursor_main;
    END;
    select * from table(ename_fn()) from dual;
    COLUMN_VALUE
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER

  • Urgent query regarding performance

    hi
    i have one query regarding performance.iam using interactive reporting and workspace.
    i have all the linsence server,shared services,and Bi services and ui services and oracle9i which has metadata installed in one system(one server).data base which stores relationaldata(DB2) on another system.(i.e 2 systems in total).
    in order to increase performance i made some adjustments
    i installed hyperion BI server services, UI services,license server and shared services server such that all web applications (that used web sphere 5.1) such as shared services and UI services in server1(or computer1).and remaining linsence and bi server services in computer2 and i installed database(db2) on another computer3.(i.e 3 systems in total)
    my query : oracle 9i which has metadata where to install that in ( computer 1 or in computer 2 )
    i want to get best performance.where to install that oracle 9i which has metadata stored in it.
    for any queries please reply mail
    [email protected]
    9930120470

    You should know that executing a query is always slower the first time. Then Oracle can optimise your query and store it temporary for further executions. But passing from 3 minutes to 3 seconds, maybe your original query is really, really slow. Most of the times I only win few milliseconds. If Oracle is able to optimize it to 3 seconds. You must clearly rewrite your query.
    Things you should know to enhance your execution time : try to reduce the number of nested loops, nested loops give your an exponential execution time which is really slow :
    for rec1 in (select a from b) loop
      for  rec2 in (select c from d) loop
      end loop;
    end loop;Anything like that is bad.
    Try to avoid Cartesian products by writing the best where clause possible.
    select a.a,
             b.b
    from  a,
            b
    where b.b > 1This is bad and slow.

Maybe you are looking for

  • How do I use camera connection kit to transfer photos from iphone 4 with ios 7 to ipad 2 with ios t?

    How do I use the camera connection kit to transfer photos from iPhone 4 with ios 7.0.2 to iPad 2 with ios 7.0.2?

  • Preparing User Accounts on windows 2008 R2

    Hi , To create account for hyperion  installation purpose oracle documents says below: Assign local policies if required by your product. For Windows, the user ID typically requires "Act as part of the OS, Bypass Traverse Checking, Log on as a batch

  • A client wants a certain type of file and I am lost

    I edit in XDCAM HD native (35mbps) A client requested some of my footage and since I obviously did not want to send him the raw discs I exported the footage out of FCP as self contained files. These are QT files with a FCP wrapper, right? He said he

  • Termination character

    Hello, I'm communicating with an 20 years old optical spectrum analyzer with GPIB connection using VISA. I having trouble reading the entire data. I've try to use the termination character options to solve this but my instrument use both line feed an

  • Installing photoshop element12 tryout

    Hi. When program finish installing it runs back and remove  the program, have done this twice now, with no luck. I'm using windows xp with sp3. Hope you can help, as i would very much like to try this program. Yours W.Morey