Perform using

hallow
i wont to now in which place it place better to use perform using and tables and which benefit i have from that ?
simle sample will help
regards

PERFORM - parameter_list
Syntax
... [TABLES itab1 itab2 ...]
[USING a1 a2 ...]
[CHANGING a1 a2 ...].
Extras:
1. ... TABLES itab1 itab2 ...
2. ... USING a1 a2 ...
3. ... CHANGING a1 a2 ...
Effect
These additions assign actual parameters to the formal parameters from the parameter interface for the subroutine subr. You can specify all data objects whose data type matches the typing of the corresponding formal parameter (see Check Typing) as actual parameters. Each formal parameter assumes all the properties of the actual parameter assigned to it when it is called.
Addition 1
... TABLES itab1 itab2 ...
Effect
If you specify the addition TABLES, each table parameter t1 t2 ... for the subroutine called that is defined with the addition TABLES to the FORM statement must be assigned an internal table itab as the actual parameter. The assignment of the actual parameters to the formal parameters takes place using their positions in the lists t1 t2 ... and itab1 itab2 ... .
You can only specify standard tables for itab. Transfer takes place by means of a reference. If a specified table itab has a header line, this is also transferred; otherwise, the header line in the corresponding table parameter t is blank when it is called.
Note
Use of table parameters in the interface for subroutines is obsolete but a large number of subroutines have not yet been converted to appropriately typed USING or CHANGING parameters, so that they must still be supplied with data by the TABLES addition to the PERFORM statement.
Example
Static call of the internal subroutine select_sflight transferring a table parameter.
PARAMETERS: p_carr TYPE sflight-carrid,
p_conn TYPE sflight-connid.
DATA sflight_tab TYPE STANDARD TABLE OF sflight.
PERFORM select_sflight TABLES sflight_tab
USING p_carr p_conn.
FORM select_sflight TABLES flight_tab LIKE sflight_tab
USING f_carr TYPE sflight-carrid
f_conn TYPE sflight-connid.
SELECT *
FROM sflight
INTO TABLE flight_tab
WHERE carrid = f_carr AND
connid = f_conn.
ENDFORM.
Addition 2
... USING a1 a2 ...
Addition 3
... CHANGING a1 a2 ...
Effect
If you specify the additions USING and CHANGING, an actual parameter a1 a2 ... of the appropriate type must be assigned to each of the formal parameters u1 u2 ... and c1 c2 ... defined with the same additions to the FORM statement. The actual parameters specified after USING and CHANGING form one shared list. They are assigned to the formal parameters after the position in the shared list. The type of parameter transfer is defined with the additions USING and CHANGING to the FORM statement. The addition USING must be before CHANGING. Otherwise, the assignment of the actual parameters to the additions USING and CHANGING is irrelevant to the PERFORM statement. It is also irrelevant whether only one or both of the additions is specified.
Notes
For the sake of program documentation, we advise that you specify the additions USING and CHANGING in the FORM statement according to the definition of the parameter interface.
In non-Unicode programs, you can address memory area outside an actual parameter if an actual parameter a1 a2 ... is assigned offset or length specifications. In non-Unicode programs, the length is set to the length of the current parameter if an offset is specified without a length. Both of these lead to warnings in the syntax check and to syntax errors in Unicode programs. The rules for the ASSIGN statement apply to the addressable memory area in non-Unicode programs as well.
Example
The following five PERFORM statements mean the same but only the fourth is recommended, since it is the only one that documents the interface of the subroutine called.
DATA: a1 TYPE string,
a2 TYPE string,
a3 TYPE string,
a4 TYPE string.
PERFORM test USING a1 a2 a3 a4.
PERFORM test CHANGING a1 a2 a3 a4.
PERFORM test USING a1 CHANGING a2 a3 a4.
PERFORM test USING a1 a2 CHANGING a3 a4.
PERFORM test USING a1 a2 a3 CHANGING a4.
FORM test USING p1 TYPE string
p2 TYPE string
CHANGING value(p3) TYPE string
value(p4) TYPE string.
ENDFORM.

Similar Messages

  • Best practice to monitor 10gR3 OSB performance using JMX API?

    Hi guys,
    I need some advice on the best practice to monitor 10gR3 OSB performance using JMX API.
    Jus to show I have done my home work, I managed to get the JMX sample code from
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/jmx_monitoring/example.html#wp1109828
    working.
    The following is the list of options I am think about:
    * Set up: I have a cluster of one 1 admin server with 2 managed servers, which managed server runs an instance of OSB
    * What I try to achieve:
    - use JMX API to collect OSB stats data periodically as in sample code above then save data as a record to a
         database table
    Options/ideas:
    1. Simplest approach: Run the modified version of JMX sample on the Admin Server to save stats data to database
    regularly. I can't see problems with this one ...
    2. Use WLI to schedule the Task of collecting stats data regularly. May be overkill if option 1 above is good for production
    3. Deploy a simple web app on Admin Server, say a simple servlet that displays a simple page to start/stop and configure
    data collection interval for the timer
    What approach would you experts recommend?
    BTW, the caveats os using JMX in http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/jmx_monitoring/concepts.html#wp1095673
    says
         Oracle strongly discourages using this API in a concurrent manner with more than one thread or process. This is because a reset performed in
         one thread or process is not visible to another threads or processes. This caveat also applies to resets performed from the Monitoring Dashboard of
         the Oracle Service Bus Console, as such resets are not visible to this API.
    Under what scenario would I be breaking this rule? I am a little worried about its statement
         discourages using this API in a concurrent manner with more than one thread or process
    Thanks in advance,
    Sam

    Hi Manoj,
    Thanks for getting back. I am afraid configuring aggregation interval from Dashboard doesn't solve problem as I need to collect stats data of endpoint URI or in hourly or daily basis, then output to CSV files so line graphs can be drawn for chosen applications.
    Just for those who may be interested. It's not possible to use SQL to query database tables to extract OSB stats for a specified time period, say 9am - 5pm. I raised a support case already and the response I got back is 'No'.
    That means using JMX API will be the way to go :)
    Has anyone actually done this kind of OSB stats report and care to give some pointers?
    I am thinking of using 7 or 1 days as the aggregation interval set in Dashboard of OSB admin console then collects stats data using JMX(as described in previous link) hourly using WebLogic Server JMX Timer Service as described in
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/jmxinst/timer.html instead of Java's Timer class.
    Not sure if this is the best practice.
    Thanks,
    Regards,
    Sam

  • Does anyone know how well the Intel Iris Pro installed on new 15" MacBook Pros performs using Photoshop and Lightroom. I have seen some differing opinions out there, and I would rather not shell out the extra cash for the Nvidia if I don't have to. I most

    Does anyone know how well the Intel Iris Pro installed on new 15" MacBook Pros performs using Photoshop and Lightroom?  I have seen some differing opinions out there, and I would rather not shell out the extra cash for the Nvidia if I don't have to. I mostly do photo editing for business and personal use. I have not used the 3D function in Photoshop, but I would like to know that I could.

    You could download a trial and see how well it works before committing to a subscription. You get 30 days to decide.
    Photo editor | Download free Adobe Photoshop CC trial
    Photo editor app | Download free Adobe Photoshop Lightroom 5 trial
    Gene

  • How can I Improve the Performance using Global Temo Tables ??

    Hi,
    Can anyone tell me , How can i make use of Global Temporary Tables to improve the Performance.
    I have few sample scripts ,
    Say i have the View based on some Complex query like ,
    CREATE OR REPLACE VIEW Profile_values_view AS
    SELECT d.Profile_option_name, d.Profile_option_id, Profile_option_value,
    u.User_name, Level_id, Level_code
    FROM Profile_definitions d, Profile_values v, Profile_users u
    WHERE d.Profile_option_id = v.Profile_option_id
    AND ((Level_code = 'USER' AND Level_id = U.User_id) OR
    (Level_code = 'DEPARTMENT' AND Level_id = U.Department_id) OR
    (Level_code = 'SITE'))
    AND NOT EXISTS (SELECT 1 FROM PROFILE_VALUES P
    WHERE P.PROFILE_OPTION_ID = V.PROFILE_OPTION_ID
    AND ((Level_code = 'USER' AND
    level_id = u.User_id) OR
    (Level_code = 'DEPARTMENT' AND
    level_id = u.Department_id) OR
    (Level_code = 'SITE'))
    AND INSTR('USERDEPARTMENTSITE', v.Level_code) >
    INSTR('USERDEPARTMENTSITE', p.Level_code));
    Now i have created the Global temp Table as ,
    CREATE GLOBAL TEMPORARY TABLE Profile_values_temp
    Profile_option_name VARCHAR(60) NOT NULL,
    Profile_option_id NUMBER(4) NOT NULL,
    Profile_option_value VARCHAR2(20) NOT NULL,
    Level_code VARCHAR2(10) ,
    Level_id NUMBER(4) ,
    CONSTRAINT Profile_values_temp_pk
    PRIMARY KEY (Profile_option_id)
    ) ON COMMIT PRESERVE ROWS ORGANIZATION INDEX;
    Now I am Inserting the Records into Temp table as
    INSERT INTO Profile_values_temp
    (Profile_option_name, Profile_option_id, Profile_option_value,
    Level_code, Level_id)
    SELECT Profile_option_name, Profile_option_id, Profile_option_value,
    Level_code, Level_id
    FROM Profile_values_view;
    COMMIT;
    Now what my doubt is, when do i need to execute the Insert Statement.
    Say , if the View returns few millions of records , then loading such a data into Global Temporary table takes lot of time.
    Then what is the use of Global Temporary tables and how can i improve the Performance using the same.
    Raj

    Thanks for the responce ,
    There are 2 to 3 complex views in our database, and there always be more than 5000+ users will be workinf on the application and is OLTP application. Those complex views are killing the application performance.
    I what i felt was, if i create the Global Temporary tables for thow views and will be able to load the one third million of records returned by the views in to cache and can improve the application performance.
    I have created the Global Temporary tables for 2 views with the option On Commit Preserve , But after am inserting the records into the Temp table and when i Issue the commit statement, the Temp table is getting Cleared.
    I really got surpised of this behaviour as i know that with the Option On Commit Preserve , the rows should retain in the Temp Table, Instead , it's getting cleared.
    Pelase suggest , what to do ??
    Raj

  • Web-based deployments can be performed using OUI

    10.2.0.x version
    Want to learn more about how Web-based deployments can be performed using OUI, if someone has good article or notes.

    By billing I assume you mean resource related billing. I don't think RRB will work without costing. Because the basic tables which act as source for RRB are cost item tables. Still, everything is possible if you make alterations to the programs. But you will have to do a cost-benefit analysis.
    I suggest that you don't think only in lines of RRB. You can write a program which can copy the materials and detemine materials for the activity types. This program can refer to one of the RRB profiles but only for material determination and can create a debit memo request or a kind of resource related quotation.
    Hope this helps.
    Bala

  • In which case we require to write perform using/changing

    hi,
    in which case we require to write perform using/changing .
    and what is excatly we r doing  with perform using.changing.
    please somebody help me.
    thanks
    subhasis

    This is an awfully basic question.
    Simply press F1 on PERFORM.
    And responders take note:
    bapi
    Rob

  • How can I Edit preferences performance use Graphics Processor option through the jsx script

    Hi I need to check and access the Edit>preferences>performance>use Graphics Processor option setting through the script. i cant find it in the object domain, I have the following to check the current state:
    var ref = new ActionReference();
    ref.putEnumerated( charIDToTypeID('capp'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
    var openglEnabled = executeActionGet(ref).getObjectValue (charIDToTypeID('CchP')).getBoolean (stringIDToTypeID('openglEnabled'));
    alert( openglEnabled );
    but then i am unable to set the value using this:
    var openglEnabled = executeActionGet(ref).getObjectValue (charIDToTypeID('CchP')).putBoolean (stringIDToTypeID('openglEnabled'));
    I tried using a recorded action but that doesnt work. Any recommendations?

    If you load the scriptlisener plug-in when you set  your preference to enable your GPU it will record the code you need.  The Code I posted to your thread in the scripting forum the other day.
    // =======================================================
    var idsetd = charIDToTypeID( "setd" );
        var desc29 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref19 = new ActionReference();
            var idPrpr = charIDToTypeID( "Prpr" );
            var idCchP = charIDToTypeID( "CchP" );
            ref19.putProperty( idPrpr, idCchP );
            var idcapp = charIDToTypeID( "capp" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref19.putEnumerated( idcapp, idOrdn, idTrgt );
        desc29.putReference( idnull, ref19 );
        var idT = charIDToTypeID( "T   " );
            var desc30 = new ActionDescriptor();
            var idMmrU = charIDToTypeID( "MmrU" );
            var idPrc = charIDToTypeID( "#Prc" );
            desc30.putUnitDouble( idMmrU, idPrc, 90.000000 );
            var idopenglEnabled = stringIDToTypeID( "openglEnabled" );
            desc30.putBoolean( idopenglEnabled, true );
        var idCchP = charIDToTypeID( "CchP" );
        desc29.putObject( idT, idCchP, desc30 );
    executeAction( idsetd, desc29, DialogModes.NO );

  • Slow performance using "NOT" operator

    Hello,
    We are experiencing extremely poor performance using the "not" operator as follows:
    AND contains(product.mycontextindex, '(music & rock) ~ hip', 1) > 0
    This query may take up to two minutes whereas eliminating the "~ hip" text will complete in 3-4 seconds. The index is fairly large. Is this a common problem for Oracle Text? Is there anything we can do to speed up the query?
    Thanks in advance.
    David.

    We are using 9i (9.2 I believe). The problem was much worse with 8i. Queries would not even return. 9i, however, hasn't really made the performance acceptable.

  • Improve data load performance using ABAP code

    Hi all,
             I want to improve my load performance using ABAP code, how to do this?. If i writing ABAP code in SE38 how i can call
    in BW side? if give sample code to improve load performance it will be usefull. please guide me.

    There are several points that can improve performance of your ABAP code:
    1. Avoid using SELECT...ENDSELECT... construct and use SELECT ... INTO TABLE.
    2. Use WHERE clause in your SELECT statement to restrict the volume of data retrieved.
    3. Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot.
    4.Avoid using nested SELECT and SELECT statements within LOOPs.
    5. Avoid using INTO CORRESPONDING FIELDS OF. Instead use INTO TABLE.
    6. Avoid using SELECT * and select only the required fields from the table.
    7. Avoid Executing a SELECT multiple times in the program.
    8. Avoid nested loops when working with large internal tables.
    9.Whenever using READ TABLE use BINARY SEARCH addition to speed up the search.
    10. Use FIELD-SYMBOLS instead of a work area when there are more than 200 entries in an internal table where some fields are being manipulated.
    11. Use MOVE with individual variable/field moves instead of MOVE-CORRESPONDING.
    12. Use CASE instead of IF/ENDIF whenever possible.
    13. Runtime transaction code se30 can be used to measure the application performance.
    14. Transaction code st05 can be used to analyse the SQL trace and measure the performance of the select statements of the program.
    15. Start routines can be used when transformation is needed in the data package level. Field/individual routines can be used for a simple formula or calculation. End routines are used when you wish to populate data not present in the source but present in the target.
    16. Always use a WHERE clause for DELETE statement. To delete records for multiple values, use SELECT-OPTIONS.
    17. Always use 'IS INITIAL' instead of equal to '' because null for a character is '' but '0' for an integer.
    Hope it helps.

  • Examining LR 4.x performance using Sysinternals ProcessMonitor

    Has anyone from Adobe looked at LR 4.x performance using Sysinternals ProcessMonitor?  I feel that it can give tremendous insight as to what the application is doing "under the covers" even without running it inside of a debugger.
    I'm providing two example captures, both in Excel format:
    1) Lightroom sitting completely idle (I haven't touched LR for a couple of minutes before capturing this information).  If I remember right, this is maybe 30 seconds worth of activity coming from Lightroom.
    Click the link to download: http://dl.dropbox.com/u/19756227/Lightroom/Lightroom%20Idle%20Logfile.xlsx
    2) Before starting the capture here, LR had been sitting idle for some time. I started the capture. clicked a new image (file name = 20120825_2470.CR2), activated the Crop Tool, deactivated the Crop Tool, then ended the capture. Probably about 10 or 11 seconds worth of capture time.
    Click the link to download: http://dl.dropbox.com/u/19756227/Lightroom/Lightroom%20Activate%20Crop%20Tool%20Logfile.xl sx
    Capture #1 is meant to give you some idea as to "background noise" ... meaning, a capture of what Lightroom is doing when it is not servicing the UI.
    Capture #2 is meant to show you how long it takes to load an image activate and deactivate the Crop Tool (this is in the Develop module).
    This is Lightroom 4.2RC running on a 3rd generation Core i7-2860QM (2.5Ghz) with 16gb of memory on Win7-64 with the images on a local hard drive (C drive) and the catalog and previews residing on an SSD (D drive).
    Some interesting things to note...
    - How often it opens my Dell U3011.icm monitor profile and how much time is spent there. (hint: a lot more than just once - and I wonder why it didn't just read the file once on startup and be done with it?)
    - How often it opens the CameraRaw\Defaults\Preferences.xmp file (again, a lot more than just once - why not load it once at start up?)
    - I see a lot of activity happening on a file on my hard drive (C:\Users\dwterry\AppData\Local\Temp\etilqs_MGZwZ6Ai0qSWbhO) and I'm wondering if there is any way I could tell Lightroom to store such files on my SSD instead? My catalog is stored on the SSD, so if Lightroom were to use the path of the Catalog to determine where to create these local temp files, it would allow me to optimize my system performance that way.
    - I see lots of activity reading my image (file name referenced up above). I figure that's just part of normal activity. Read the file in 64K at a time. Makes sense.
    - I see the xmp file being updated and I wonder why? I haven't changed anything yet. All I did was click on the image, activate and deactivate the crop tool without actually doing anything. Optimize it to only write to the .xmp file when something changes.
    - I see probably the majority of the time being spent creating and closing threads. That's probably where the real work happens. But I wonder if the threads could be optimized?
    Anyway... that's just a bit of insight from a little tool used to monitor the process.  I wonder if we could get Adobe Engineers (people with real access to the source code and debuggers) to check it out and see if they can find ways to optimize what Lightroom is doing?
    This is a brand new machine. It's faster than my previous computer. I upgraded specifically to try to work around LR 4.x sluggishness. LR 4.2 is still slower than 3.6 was on my old computer. My only goal here is to try to help identify the problem so that a cure can be found.

    As long as the X-Rite Eye-One Match application isn't launched AND the i1 Display dongle isn't plugged in, then it is not related. It does however explain why ambient light monitoring might cause LR's polling of the display profile to go loopy.
    I think you're on to something with monitoring sysinternals to identify the cause of sluggish LR behavior. Unfortunately my Win 7 i7 system runs fine and so far there’s nothing peculiar in the Resource Monitor that I can see, despite trying to bring it to its knees. The only thing I've been able to pin down is sluggish Develop sliders, which seems common when using very high resolution displays and/or dual displays. Open GL support or something similar to offload display rendering to the graphics card will be required, or just damn fast processors. Obviously, there are many other causes of sluggish LR performance, lockups, and crashes yet to be identified.

  • How to get comparable Oracle JDBC performance using Java 1.4 vs 1.1.7?

    Our application makes extensive use of JDBC to access an Oracle database. We wrote it a number of years ago using java 1.1.7 and we have been unable to move to new versions of java because of the performance degradation.
    I traced the problem to JDBC calls. I can reproduce the problem using a simple program that simply connects to the database, executes a simple query and then reads the data. The same program running under java 1.4 is about 60% slower than under java 1.1.7. The query is about 80% slower and getting the data is about 150% slower!
    The program is attached below. Note, I run the steps twice as the first time the times are much larger which I attribute to java doing some initializations. So the second set of values I think are more representative of the actual performance in our application where there are numerous accesses to the database. Specifically, I focus on step 4 which is the execute query command and step 5 which is the data retrieval step. The table being read has 4 columns with 170 tuples in it.
    Here are the timings I get when I run this on a Sparc Ultra 5 running
    SunOs 5.8 using an Oracle database running 8.1.7:
                     java 1.1.7  java 1.4
            overall:    2.1s         3.5s
            step 1:     30           200
            step 2:    886          2009
            step 3:      2             2
            step 4:      9            17
            step 5:    122           187
            step 6:      1             1
            step 1:      0             0
            step 2:    203           161
            step 3:      0             1
            step 4:      8            15   <-   87% slower
            step 5:     48           117   <-  143% slower
            step 6:      1             2I find the same poor performance from java versions 1.2 and 1.3.
    I tried using DataDirect's type 4 JDBC driver which gives a little better performance but overall it is still much slower than using java 1.1.7.
    Why do the newer versions of java have such poor performance when using JDBC?
    What can be done so that we can have performance similar to java 1.1.7
    using java 1.4?
    ========================================================================
    import java.util.*;
    import java.io.*;
    import java.sql.*;
    public class test12 {
        public static void main(String args[]) {
            try {
                    long time1 = System.currentTimeMillis();
    /* step 1 */  DriverManager.registerDriver(
                        new oracle.jdbc.driver.OracleDriver());
                    long time2 = System.currentTimeMillis();
    /* step 2 */  Connection conn = DriverManager.getConnection (
                  "jdbc:oracle:thin:@dbserver1:1521:db1","user1","passwd1");
                    long time3 = System.currentTimeMillis();
    /* step 3 */  Statement stmt = conn.createStatement();
                    long time4 = System.currentTimeMillis();
    /* step 4 */  ResultSet rs = stmt.executeQuery("select * from table1");
                    long time5 = System.currentTimeMillis();
    /* step 5 */  while( rs.next() ) {
                      int message_num = rs.getInt(1);
                      String message = rs.getString(2);
                    long time6 = System.currentTimeMillis();
    /* step 6 */  rs.close(); stmt.close();
                    long time7 = System.currentTimeMillis();
                System.out.println("step 1: " + (time2 - time1) );
                System.out.println("step 2: " + (time3 - time2) );
                System.out.println("step 3: " + (time4 - time3) );
                System.out.println("step 4: " + (time5 - time4) );
                System.out.println("step 5: " + (time6 - time5) );
                System.out.println("step 6: " + (time7 - time6) );
                System.out.flush();
            } catch ( Exception e ) {
                System.out.println( "got exception: " + e.getMessage() );
            ... repeat the same 6 steps again...
    }

    If I run my sample program with the -server option, it
    takes a lot longer (6.8s vs 3.5s).Which has to be expected, as the -server option optimizes for long running programs - so it shoudl go with my second suggestion, more below...
    I am not certain what you mean by "just let the jvm
    running". Our users issue a command (in Unix) which
    invokes one of our java programs to access or update
    data in a database. I think what you are suggesting
    would require that I rewrite our application to have a
    java program always running on the users workstation
    and to also rewrite our
    commands (over a hundred) to some how pass data and
    receive data with this new server java program. That
    does not seem a very reasonable just to move to a new
    version of java. Or are you suggesting something
    else?No I was just suggestion what you descript. But if this is not an option, then maybe you should merge your java-programs to C or another native language. Or you could try the IBM-JDK with the -faststart (or similar) option. If thew Unix you mention is AIX, then there would be the option of a resetable-vm. But I cannot say if this VM would solve your problem. Java is definitly not good for applications which only issue some unqiue commands because the hotspot-compiler can not be efficiently used there. You can only try to get 1.1.7 performance by experimenting with vm-parameters (execute java -X).

  • Slow performance using getBlob(), how can I correct this ?

    I have wav files stored in a database that range from 10M - 75M... When I make a JDBC call using ResultSet..ie a rs.getBlob for a large wav file, the performance is terribly slow. How can I improve this ? Is there a way to get the BLob is pieces or sections ?

    Hi. Thanks for you response.
    You are correct. I believe the code is not slow when running the result.getBlob funciton is called, it must be when I stream it to the audio player. The point where it becomes slow is when I try and play it. After clicking play the song starts about 15 seconds later.
    Here is my code:
    PreparedStatement stmt = conn.prepareStatement(select);
                   ResultSet result = stmt.executeQuery();
                   while( result.next() ) {
                        blob = result.getBlob(type);
                   result.close();
                   stmt.close();
                   result = null;
    InputStream is = blob.getBinaryStream();
                   SourceDataLine line;
              AudioInputStream stream = AudioSystem.getAudioInputStream(is);

  • Help needed in SQL performance - Using CASE in SQL statement versus 2 query

    Hi,
    I have a requirement to find count from a bunch of tables.
    The SQL I have gives the count of all members.
    I have created 2 queries to find count of active and inactive members.
    The key difference is only the active dates.
    Each query takes 20 seconds to execute.
    I modified the SQL to use CASE statement in the SELECT.
    So after the data is fetched the CASE statement will evaluate the active date and gives 2 counts (active and inactive)
    Is it advisable to use this approach. Will CASE improve SQL performance ? I have to justify this.
    Please let me know your thoughts.
    Thanks,
    J

    Hi,
    If it can be done in single SQL do it in single SQL.
    You said:
    Will CASE improve SQL performance There can be both cases to prove if the performance is better or worse.
    In your case you should tell us how it is.
    Regards,
    Bhushan

  • Value mapping performance using LookUp API

    All,
    We are using Value mapping look up from an external table using JDBC adapter and Lookup API. The scenario works good, but the performance is a hit for us as it is taking 7 seconds for the first step and the subsequent steps are taking much longer. In the performance header it shows that the steps "DB ENTRY QUEUING" and "DB SPLITTER QUEUING" are taking 90% of the time even though mapping execution is real quick.
    We tried the below things which did not help us analyze or isolate the problem.
    1. We increased the number of dialog processes from 3 to 8. (Optimal value should be 5)
    2. We tested the scenario using Value mapping in ID instead of external table. But it is almost taking the same time in the above two steps mentioned.
    I would like to know whether any kind of configuration settings to be done on the server like "specifying connection pool capabilities" etc...
    Any pointers would be really appreciated.
    Thanks and Regards,
    GP

    Hi,
    Have you seen this weblogs by Prasad recently:
    /people/prasad.illapani/blog/2007/03/08/performance-tuning-checks-in-sap-exchange-infrastructure
    /people/prasad.illapani/blog/2007/04/20/performance-tuning-checks-in-sap-exchange-infrastructurexi-part-ii
    Also are you doing multiple lookups or a single lookup? If you are using multiple lookup for multiple fields which has the same logic then try to use global variables.
    ---Satish

  • Poor Performance using Generic Conectivity for ODBC

    Hi my friends.
    I have a problem usign Generic Conectivity , I need update 500,000 records in MS SQL Server 2005, I'm using Generic Conectivity for ODBC. In my Oracle Database i have create a DB_LINK called TEST to redirect to MS SQL Server database.
    Oracle Database: 10.2.0.4
    MS SQL Server version: 2005
    The time for update 1,000 records in MS SQL Server using DBMS_HS_PASSTHROUGH is ten minutes. This is a poor performance.
    This is de PL/SQL
    DECLARE
    c INTEGER;
    nr INTEGER;
    CURSOR c_TEST
    IS
    SELECT "x", "y"
    FROM TEST_cab
    WHERE ROWNUM <= 1000
    ORDER BY "y";
    BEGIN
    FOR cur IN c_TEST
    LOOP
    c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@TEST;
    DBMS_HS_PASSTHROUGH.PARSE@TEST(
    c,
    'UPDATE sf_TEST_sql
    SET observation= ?
    WHERE department_id = ?
    AND employee_id = ? ');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@TEST (c, 1, 'S');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@TEST (c, 2, 'N');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@TEST (c, 3, 'ELABORADO');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@TEST (c, 4, 'PENDIENTE');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@TEST (c, 5, cur."x");
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@TEST (c, 6, cur."y");
    nr := DBMS_HS_PASSTHROUGH.EXECUTE_NON_QUERY@TEST (c);
    DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@TEST (c);
    COMMIT;
    END LOOP;
    END;
    You can help, how better the performance for update 500,000 record by record in MS SQL Server. I need advantages of use Oracle Transparent Gateway for Microsoft SQL Server.
    your's can suggest my another solution ?
    Thanks.

    Hi,
    There are no real parameters to tune the gateways. You should turn on gateway debug tracing and check the SQL that is being sent to SQL*Server to make sure is update statements and nothing else.
    If this is the case then the time taken will be down to various factors, such as network delays, processing on SQL*Server and so on.
    How long does it take to update the same number of records directly on SQL*Server without the Oracle or the gateway involved or if you use another non-Oracle client to do the same updates across a network, if a network is involved ?
    It may be possible to improve performance by changing the HS_RPC_FETCH_REBLOCKING parameter, so have a look at this note in My Oracle Support -
    Tuning Generic Connectivity And Gateways (Doc ID 230543.1)
    Regards,
    Mike

Maybe you are looking for

  • Help with Adobe Premiere Elements window appearing!

    I've owned Adobe Premiere Elements 4.0 for about 5 or 6 years now. I still have the original disc and serial number. I installed it on my laptop (Sony Vaio bought in 2009. Runs on Vista), and when I open the program up and click on "files and folders

  • APO livecache

    I am faceing problem with live cache is down ....when i was checked xsercer is down then i start the xserver and check at sap level LC10 it shows down...i tryed to start the livecache at sap....but it shows error message...Error DBMCLI_COMMAND_EXECUT

  • Accessing Mediator Payload via API's

    Hi, I would like to know is there are any API's through which we can access the Oralce Mediator API's. Any help would be appreciated. Regards, Santosh Hemashekar

  • Dreamweaver cc 2014 crashes (PC version)

    Hardware: PC, Windows 7 pro; 24GB memory I recently upgraded my Dreamweaver from CC to the most recently version of CC 2014. My previous version of Dreamweaver was "rock solid", and the new version crashes at least once a day. Is there any place to l

  • How to close tabs that will not close?

    After being on several sites I am unable to close tabs that I am done with. Started a couple weeks ago.