How to optimize that

Dear Readers,
I've got query which runs 12s, is there any possibility to optymize
it ?
  SELECT distinct g.cl_id,
         cl_bank_id,
         cl_name,
         cl_corresp_name,
        cl_city,
         cl_corresp_city,
         cl_street,
         cl_corresp_street,
         cl_postal_code,
         cl_corresp_postal_code,
        0 as au_free_pass,
         'NO' as dv_main
    FROM ib_clients g, ib_auth_devices, ib_clients_replicated,
         (select dv_cl_id as cl_id, count(au_number) as c
          from ib_auth_cards, ib_auth_devices
         where au_dv_id = dv_id and au_card_state = 'NOTUSED'
          group by dv_cl_id) cards,
          (select dv_cl_id as cl_id, count(to_number) as c
          from ib_tokens, ib_auth_devices
          where to_dv_id = dv_id
          group by dv_cl_id) tokens
   WHERE g.cl_id = cp_cl_id AND
         g.cl_id = dv_cl_id AND
         g.cl_lock in ('ACTIVE', 'SOMET', 'LOGIN') AND
         dv_main = 'NO' and
         cards.cl_id (+)= g.cl_id and
         cards.c is null and
         tokens.cl_id (+)= g.cl_id and
         tokens.c is null
order by 1
568 wierszy zostało wybranych.
Plan wykonywania
   0      SELECT STATEMENT Optimizer=CHOOSE (Cost=6876 Card=79532 Byte
          s=15747336)
   1    0   SORT (UNIQUE) (Cost=4577 Card=79532 Bytes=15747336)
   2    1     HASH JOIN (Cost=2278 Card=79532 Bytes=15747336)
   3    2       TABLE ACCESS (FULL) OF 'IB_AUTH_DEVICES' (Cost=150 Car
          d=169682 Bytes=1866502)
   4    2       FILTER
   5    4         HASH JOIN (OUTER)
   6    5           FILTER
   7    6             HASH JOIN (OUTER)
   8    7               HASH JOIN (Cost=359 Card=39979 Bytes=5876913)
   9    8                 TABLE ACCESS (FULL) OF 'IB_CLIENTS' (Cost=54
           Card=39979 Bytes=599685)
  10    8                 TABLE ACCESS (FULL) OF 'IB_CLIENTS_REPLICATE
          D' (Cost=178 Card=94895 Bytes=12526140)
  11    7               VIEW (Cost=162 Card=2688 Bytes=53760)
  12   11                 SORT (GROUP BY) (Cost=162 Card=2688 Bytes=45
          696)
  13   12                   NESTED LOOPS (Cost=150 Card=2688 Bytes=456
          96)
  14   13                     TABLE ACCESS (FULL) OF 'IB_AUTH_DEVICES'
           (Cost=150 Card=339364 Bytes=4072368)
  15   13                     INDEX (UNIQUE SCAN) OF 'IB_PK_TO_DV_ID'
          (UNIQUE)
  16    5           VIEW (Cost=1165 Card=87879 Bytes=1757580)
  17   16             SORT (GROUP BY) (Cost=1165 Card=87879 Bytes=2109
          096)
  18   17               HASH JOIN (Cost=573 Card=125916 Bytes=3021984)
  19   18                 TABLE ACCESS (FULL) OF 'IB_AUTH_CARDS' (Cost
          =65 Card=125916 Bytes=1510992)
  20   18                 TABLE ACCESS (FULL) OF 'IB_AUTH_DEVICES' (Co
          st=150 Card=339364 Bytes=4072368)
Statystyki
          0  recursive calls
         30  db block gets
     353921  consistent gets
       4977  physical reads
          0  redo size
     125965  bytes sent via SQL*Net to client
       4533  bytes received via SQL*Net from client
         39  SQL*Net roundtrips to/from client
         21  sorts (memory)
          1  sorts (disk)
        568  rows processedRegards.
Grzegorz

WHERE
dv_main = 'NO' and
g.cl_lock in ('ACTIVE', 'SOMET', 'LOGIN') AND
cards.c is null and
tokens.c is null and
g.cl_id = cp_cl_id AND
g.cl_id = dv_cl_id AND
cards.cl_id (+)= g.cl_id and
tokens.cl_id (+)= g.cl_id
order by 1
Is this re-arranging will enchance the performance?
like user defind seraches will first execute or it doesn't matter??

Similar Messages

  • I cannot get my Windows live hotmail acct. to access my email. Windows support suggests I optimize my browzer, but don't know how to do that

    I cannot get my Windows live hotmail acct. to access my email. Windows support suggests I optimize my browzer, but don't know how to do that. I never had a problem before and have always used Mozilla Firefox as my browser. The Firefox4 also looks different since I changed it. No Google bar in the center, or the Mozilla logo.

    You can do a test if it works in Private Browsing mode. In PB mode the disk cache isn't used and also the currently saved cookies are not available.
    You can enter Private Browsing mode if you select:
    * Tools > Options > Privacy, choose the setting <b>Firefox will: Use custom settings for history</b>
    *Check-mark: [X] "Permanent Private Browsing mode"
    Close the Options window and open the Hotmail log in page.
    You can remove the check-mark ([ ] "Permanent Private Browsing mode") to leave PB mode.
    If that works the it is possible that there is problem with the file cookies.sqlite that stores the cookies in the Firefox Profile Folder.
    You can rename (or delete) <b>cookies.sqlite</b> (cookies.sqlite.old) and delete <b>cookies.sqlite-journal</b> and <b>cookies.txt</b>, if they exist, in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder] in case the file cookies.sqlite got corrupted.
    * http://kb.mozillazine.org/Cookies#Removing_cookies

  • How to optimize xquery expression ?

    hi,
    i got berkeley db xml database with containers: dicom.dbxml and instancemetadata.dbxml.
    dicom.dbxml contains documents as follow:
    <?xml version="1.0" encoding="UTF-8"?>
    <instance docid="dicom_1009">
         <dicom_item>
              <dicom_header>
                   <dicom_tag group="0002" element="0000" vr="UL">194</dicom_tag>
                   <dicom_tag group="0002" element="0001" vr="OB"/>
                   <dicom_tag group="0002" element="0002" vr="UI">1.2.840.10008.5.1.4.1.1.2</dicom_tag>
                   <dicom_tag group="0002" element="0003" vr="UI">2.16.840.1.113662.2.1.4519.41582.4105152.419990505.410523251</dicom_tag>
                   <dicom_tag group="0002" element="0010" vr="UI">1.2.840.10008.1.2.1</dicom_tag>
                   <dicom_tag group="0002" element="0012" vr="UI">2.16.840.1.113662.2.1.1</dicom_tag>
                   <dicom_tag group="0002" element="0016" vr="AE">PHOENIXSCP</dicom_tag>
              </dicom_header>
              <dicom_body>
                   <dicom_tag group="0008" element="0000" vr="UL">596</dicom_tag>
                   <dicom_tag group="0008" element="0005" vr="CS">ISO_IR 100</dicom_tag>
                   <dicom_tag group="0008" element="0008" vr="CS">ORIGINAL\PRIMARY\AXIAL</dicom_tag>
                   <dicom_tag group="0008" element="0012" vr="DA">1999.05.05</dicom_tag>
                   <dicom_tag group="0008" element="0013" vr="TM">10:52:34.530000</dicom_tag>
                   <dicom_tag group="0008" element="0016" vr="UI">1.2.840.10008.5.1.4.1.1.2</dicom_tag>
                   <dicom_tag group="0008" element="0018" vr="UI">2.16.840.1.113662.2.1.4519.41582.4105152.419990505.410523251</dicom_tag>
                   <dicom_tag group="0008" element="0020" vr="DA">1999.05.05</dicom_tag>
                   <dicom_tag group="0008" element="0021" vr="DA">1999.05.05</dicom_tag>
                   <dicom_tag group="0008" element="0022" vr="DA">1999.05.05</dicom_tag>
                   <dicom_tag group="0008" element="0023" vr="DA">1999.05.05</dicom_tag>
                   <dicom_tag group="0008" element="0030" vr="TM">10:52:34.530000</dicom_tag>
                   <dicom_tag group="0008" element="0031" vr="TM">10:52:34.530000</dicom_tag>
                   <dicom_tag group="0008" element="0032" vr="TM">10:52:34.530000</dicom_tag>
                   <dicom_tag group="0008" element="0033" vr="TM">10:52:32.510000</dicom_tag>
                   <dicom_tag group="0008" element="0060" vr="CS">CTTR</dicom_tag>
              </dicom_body>
         </dicom_item>
    </instance>
    instancemetadata.dbxml contains documents as follow:
    <?xml version="1.0" encoding="UTF-8"?>
    <instancemetadata xmlns="imuba.med" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="imuba.med Instancemetadata.xsd">
              <name/>
              <notes/>
              <id>instancemetadata_1</id>
              <instanceid>dicom_1</instanceid>
              <createusername>dd</createusername>
              <createdate>Tue May 02 21:08:06 CEST 2006</createdate>
              <lastmodusername>dd</lastmodusername>
              <lastmoddate>Tue May 02 21:08:06 CEST 2006</lastmoddate>
         </instancemetadata>
    and i got XQuery expression:
    declare namespace n = "imuba.med";
    declare variable $insCont external;
    for $ins in collection(concat(concat("dbxml:containers/", string($insCont)),".dbxml"))/instance,
         $met in collection("dbxml:containers/instancemetadata.dbxml")/n:instancemetadata
    where
    $ins/dicom_item/dicom_body/dicom_tag[@group='0008' and @element='0060'] = "CTTR" and
    $ins/@docid = $met/n:instanceid
    return
    <row>
    { $ins/@docid }
    { $met/n:name }
    { $met/n:notes }
    { $met/n:id }
    { $met/n:instanceid }
         { $met/n:createusername }
    { $met/n:createdate }
    { $met/n:lastmodusername }
    { $met/n:lastmoddate }
    </row>
    while i got 5000 documents in dicom container, the xquery execution time is close to 10 secs. i've tried to create indices using commands:
                        XmlIndexSpecification is = xcDicom.getIndexSpecification();
                        is.addIndex("", "docid", "unique-node-attribute-equality-string");
    and
                        XmlIndexSpecification iss = xcIns.getIndexSpecification();
                        iss.addIndex("imuba.med", "instanceid", "unique-node-element-equality-string");
    And then the execution time is nearly about 7-8 sec, but it's still big (the database contains only 5000 documents).
    Have you any idea how to optimize it ? I suppose the index on element i'm using in the WHERE clause would be helpful (dicom_item/dicom_body/dicom_tag[@group='0008' and @element='0060']). Well, i haven't found concept how to add index on element which can be shown using xpath expression.
    thanks for any help
    Darek

    Hi Darek,
    First off, why not try adding these indexes to see what happens:
    is.addIndex("", "dicom_tag", "node-element-equality-string");
    is.addIndex("", "group", "node-attribute-equality-string");
    is.addIndex("", "element", "node-attribute-equality-string");
    Secondly, what storage model are you using? I would expect you to get better query times using a NodeContainer, with the DBXML_INDEX_NODES flag enabled.
    Thirdly, your "instance" document is not very "XML" like, so you will struggle to get very good query times using that format. If you have control over the format of the document, I would suggest incorporating one or more of the "group", "element", and "vr" attributes into the name of the element - so that you will get multiple elements with different names, instead of one element name with multiple permutations of attributes. Selecting an element by name will always be faster than selecting it by some kind of value.
    Let me know how you get on with these suggestions,
    John

  • IPod w/Cassette Adapter-How to Optimize Sound Quality?

    I have I believe a G2 iPod (15 GB), and I play it in my car using a cassette adapter. I've found that to keep the sound from degrading at above average volumes, I have to make some adjustments. One, I have to set the EQ to 'Bass Reducer'. Two, I have to make sure the volume on the iPod is at about 80%. If I go above that, the sound distorts. The lower you go below that, the more hissing you get w/ the playback. I also turn the 'Sound Check' setting on.
    Any other recommendations on how to optimize the sound quality when playing it through your vehicle sound system? Also, I'm thinking about getting a G5 unit (most likely the 4 GB Nano). Anyone have any feedback on whether I can expect better sound quality, in particular in my vehicle with the setup outlined above, by upgrading to the newer unit?

    Various Methods to Connect to a Car Stereo System, or Listen to Your iPod in the Vehicle
    Best:
    Direct connection via the dock connector or headphone jack of your iPod, to the mini-jack input (or AUX RCA input jacks) of your car stereo. Not many low/moderate-end cars have this feature yet, but it is becoming more popular. Some aftermarket auto stereo units may have this feature.
    There are also some after-market, moderate to fairly expensive direct interfaces, that hook into your existing car stereo to provide a high-quality, direct connection. Most will also power/charge the iPod. Pretty slick, but can be pricey ($80-$300). If money is no object, a clean way to go. Not very portable from car to car – if at all.
    http://logjamelectronics.com/ipodproducts.html
    http://www.myradiostore.us/auxadapters/blitzsafe/blitzsafe-m-link-ipod-interface .html
    http://www.theistore.com/ipod2car.html
    http://www.mp3yourcar.com/
    Better:
    Connect your iPod to a cassette adaptor and play your tunes through your car's cassette player. Some new cars no longer come with a cassette player, so it may not be an option. It will provide even better audio quality if you can run the audio feed out of the dock connector (see the SendStation link below). Can be portable between cars that have a cassette player and also be used in your home cassette system. $5 to $20 for the adaptors, with large variations in quality (even with the same model).
    Good:
    Attach an FM transmitter to your iPod and play the tunes through an unused FM station. Convenient, but wireless FM transmitter signals are susceptible to static and outside interference, and can vary in strength and quality depending on your location. Some noticeable degradation and distortion, depending on the quality of the transmitter, the sensitivity of your ears and the airwave congestion in your area. Highly portable between cars, and may be used in a home system. FM transmitters that need to be plugged into a DC auto jack may not work in a home environment (without some sort of adaptor). You can pay from $15 to more than $80 for some of these.....but for FM quality audio, how much is too much?
    Marginal:
    Attach an external speaker system to the iPod and play it in the car. Workable, but not too good - unless you spring for a $300+ Bose (or similar) system. But why? Only if your vehicle has no Stereo system, perhaps.
    Brave Techno-Geek:
    This site gives some directions on adapting a car stereo by yourself. Risky, but it has been successfully accomplished by a forum member. Fairly inexpensive....unless you screw it up.
    Whichever you choose, power the iPod through your car’s DC power -- either from a power adapter, or as part of the combined audio adaptor. Have a method to secure the iPod to the dash/console/etc. See the reviews for all the various accessories at the iLounge
    You will also get better audio output if the dock connection plug is used, rather than the headphone jack. See Sendstation for a novel adaptor called a PocketDock. Others types are also available via this site.
    I have read positive and negative reviews of each method, and within methods there are great variations in performance of different manufacture's systems – and peoples’ opinions of their performance. Some cassette adaptors/FM transmitters work poorly, some better.
    FWIW: I have the iTrip Mini & the Newer Technology RoadTrip!+ FM transmitters, a Belkin cassette adaptor (used both with & w/out the PocketDock) and two vehicles with the BlitzSafe direct interface. Using the same song in the same car, I found that the FM transmitters worked, but not as good as the cassette adapter via the headphone jack. Using the PocketDock on the cassette adapter resulted in a significant audio quality improvement. As expected, the Blitzsafe direct connect was exceptionally better than everything else: less tinny, a more warmer/richer sound, and close to true CD quality.

  • How to optimize this sql by writing MINUS function.

    Hi all,
    how to optimize the sql by writing MINUS function.
    these are my tables
    1. CREATE TABLE POSTPAID
    RECORD VARCHAR2(2000 BYTE),
    FLAG NUMBER
    Record format:
    Mobile no in 1:10 of that length
    2. CREATE TABLE SUBSCRIBER
    PHONE_NO VARCHAR2(10 BYTE)
    My requirement is following sql need write using ‘minus’ as this one is very slow
    select record record from POSTPAID where substr(record,9,10) NOT in (select PHONE_NO from SUBSCRIBER)
    Thanks

    Why are you very particular about using "MINUS". You can optimize the sql by using "NOT EXISTS" instead of "NOT IN" as below:
    SELECT RECORD FROM POSTPAID A WHERE NOT EXISTS (SELECT 1 FROM SUBSCRIBER B WHERE SUBSTR(A.RECORD,9,10) = B.PHONE_NO)

  • How to optimize this select statement  its a simple select....

    how to optimize this select statement  as the records in earlier table is abt i million
    and this simplet select statement is not executing and taking lot of time
      SELECT  guid  
                    stcts      
      INTO table gt_corcts
      FROM   corcts
      FOR all entries in gt_mege
      WHERE  /sapsll/corcts~stcts = gt_mege-ctsex
      and /sapsll/corcts~guid_pobj = gt_Sagmeld-guid_pobj.
    regards
    Arora

    Hi Arora,
    Using Package size is very simple and you can avoid the time out and as well as the problem because of memory.  Some time if you have too many records in the internal table, then you will get a short dump called TSV_TNEW_PAGE_ALLOC_FAILED.
    Below is the sample code.
    DATA p_size = 50000
    SELECT field1 field2 field3
       INTO TABLE itab1 PACKAGE SIZE p_size
       FROM dtab
       WHERE <condition>
    Other logic or process on the internal table itab1
    FREE itab1.
    ENDSELECT.
    Here the only problem is you have to put the ENDSELECT.
    How it works
    In the first select it will select 50000 records ( or the p_size you gave).  That will be in the internal table itab1.
    In the second select it will clear the 50000 records already there and append next 50000 records from the database table.
    So care should be taken to do all the logic or process with in select and endselect.
    Some ABAP standards may not allow you to use select-endselect.  But this is the best way to handle huge data without short dumps and memory related problems. 
    I am using this approach.  My data is much more huge than yours.  At an average of atleast 5 millions records per select.
    Good luck and hope this help you.
    Regards,
    Kasthuri Rangan Srinivasan

  • How to optimize code for getting list of portal GP erroneous processes

    Hello,
    In our Web Dynpro application for Java we got the list of GP processes with status Erroneous which match the following criteria (initiator, processName, blockName, actionName, startDate, endDate, instanceName, actionProcessor) by loop of all portal users. The problem is that it takes too much time for execution. In example with 200 users it takes about 5 min. Any idea how to optimize execution?
    <br>
    <br>
    <br>
    <br>
    public java.util.List getListOfUser( )  {<br>
        //@@begin getListOfUser()<br>
         List<IUser> usersList = null;<br>
            try {<br>
              ISearchResult uniqueIDs =  UMFactory.getUserFactory().getUniqueIDs();     <br>
              if (uniqueIDs.getState() == ISearchResult.SEARCH_RESULT_OK)     <br>
              {     <br>
         usersList = new ArrayList<IUser>();     <br>
                 for (Iterator<?> it = uniqueIDs; it.hasNext();) {     <br>
                     usersList.add(UMFactory.getUserFactory().getUser((String)it.next()));     <br>
         }     <br>
               }       <br> 
            } catch (UMException ex) {     <br>
            msgMngr.reportException("Unable get list of users!");     <br>
         }          <br>
         return usersList;     <br>
        //@@end     <br>
      }     <br>
    <br>
    <br>
    <br>
    public void getErrorProcessAllUser( )  {     <br>
    IUser currentUser = null;     <br>
              try {        <br>
                    if (wdContext.nodeUsers().currentUsersElement().getLogonId() == null){     <br>
                         List<IUser> userList = getListOfUser( );     <br>
    <font color="red">//{this loop is extremely slow</font>     <br>
                             for(int n = 0; n < userList.size();n++){       <br>
                                     String logonID =  userList.get(n).getUniqueName();     <br>
                                    currentUser = UMFactory.getUserFactory().getUserByUniqueName(logonID);     <br>
                                  viewProcessDetails(currentUser);     <br>
                         }     <br>
    //}     <br>
                     }else{     <br>
                         currentUser = <br>     UMFactory.getUserFactory().getUserByUniqueName(wdContext.nodeUsers().currentUsersElement().getLogonId());
                         viewProcessDetails(currentUser);<br>
                     }<br>
                   } catch (UMException e) {<br>
                    msgMngr.reportException("No user with this logonId!");<br>
                   }<br>
    }<br>
    <br>
    <br>
      public void viewProcessDetails( com.sap.security.api.IUser currentUser )  {<br>
        //@@begin viewProcessDetails()<br>
             List<IProcessInfoElement> bindableResult = new ArrayList<IProcessInfoElement>();<br>
                 try {   <br>
                    IGPRuntimeManager rtManager = GPProcessFactory.getRuntimeManager();<br>                           
                    IGPWorkItem[] workItems = rtManager.getWorkItems(GPWorkItemStatus.WORKITEM_STATUS_COMPLETED_BY_SYSTEM,<br> GPContextFactory.getContextManager().createUserContext(currentUser));<br>
                     for(int i = 0; i < workItems.length; i++){<br>
                               IGPProcessInstanceInfo processInfo =  rtManager.getProcessInstanceInformation(workItems<i>.getProcessID(), currentUser);<br>
                               if(GPBlockInstanceStatus.getStatusForCode(processInfo.getStatus()) == GPBlockInstanceStatus.BLOCK_INSTANCE_STATUS_ERROR){ <br>
                                    IGPProcessInstance instance = rtManager.getProcessInstance(processInfo, GPContextFactory.getContextManager().createUserContext(currentUser));  <br>                           
                                    IGPActivityInstance[] blocksList = instance.getChildrenInformation();    <br>
                            for(int j = 0; j < blocksList.length; j++){    <br>
                                     IGPActivityInstance[] actionsList = ((IGPBlockInstance)blocksList[j]).getChildrenInformation();
                                for (int k = 0; k < actionsList.length; k++){<br>               
          DO SOMETHING

    got the answers ..
    we have use IndexedRecord instead of MappedRecord
                   IndexedRecord input = rf.createIndexedRecord("input");
                   boolean flag = input.add("/FolderpathValue");
                   flag = input.add("CampusCodeValue");
    <b>Thanks</b>,
    Saravanan

  • How to achieve that "SELECT * FROM table WHERE age BETWEEN 18 AND 23 AND n"

    How to achieve the SQL like that "SELECT * FROM table WHERE age BETWEEN 18 AND 23 AND name = 'Will' " with BDB C-API
    The primary key in the primary database is 'age' ,and the secondary key in the secondary index is 'name' ,in a lot of examples ,there are all simple , but how to do that complex one.thx~

    but this means that the prepared statement is created
    each time I call my method and so I'm not sure that
    the optimizer will find it easy to cope with.You are right, the optimizer won't find that easy to deal with (presuming that is even relevant for your driver/database.) But most optimizers won't do anything with statements that change and that is what you are doing.
    You could create several prepared statements which have a common number of bind variables. For example 10 statements with from 1 to 10 bind values. This will work if most of the queries use those.

  • How to optimize a MDX aggregation functions containing "Exists"?

    I have the following calculated measure:
    sum(([D Player].[Player Name].[All],
    exists([D Match].[Match Id].children,([D Player].[Player Name].currentmember,[Measures].[In Time]),"F Player In Match Stat" ))
    ,[Measures].[Goals])
    Analyzing this calculated measure (the one with "nonempty") in MDX Studio shows "Function
    'Exists' was used inside aggregation function - this disables block computation mode".
    Mosha Pasumansky spoke about this in one of his posts titled "Optimizing
    MDX aggregation functions" where he explains how to optimize MDX aggregation functions containing "Filter",
    "NonEmpty", and "Union", but he said he didn't have time to write about Exists, CrossJoin, Descendants, or EXISTING (he posted this in Oct. 2008 and the busy man didn't have time since that date :P )... so anyone knows an article that continues
    on what Mosha miss or forgot? how to optimize a MDX aggregation function containing "Exists"? what can I do to achieve the same as this calculated measure but in block mode not cell-by-cell mode ?

    Sorry for the late replay.
    I didn't check if your last proposed solution is faster or not, but I'm sorry to say that it gave the wrong result, look at this:
    Player Name
    Players Team
    Goals Player Scored with Team
    A
    Team's Goals in Player's Played Matches
    Lionel Messi
    Argentina
    28
    28
    110
    Lionel Messi
    Barcelona
    341
    330
    978
    The correct result should be like the green column. The last proposed solution in the red column.
    If you look at the query in my first post you will find that the intention is to find the total number of goals a team scored in all matches a player participated in. So in the above example Messi scored 28 goals for Argentina (before the last world cup:)
    )  when the whole Argentinian team scored 110 goals (including Messi's goals) in those matches that Messi played even one minute in.

  • How to optimize web2 in order to open the window more quickly?

    how to optimize web2 in order to open the window more quickly ?

    salientgreen is right. But my suggestion is that you'd better first transfer these data to your computer to have a backup and then delete them to free up space.
    By the way, you can open Settings and navigate to General > Usage to get an idea of your storage consumption. Music, videos, and photos might be the biggest offender.

  • I am trying to create a multi provider ? how to optimize my query performan

    hi,
    I am trying to creating a multi provider using four ods ? can anyone let me know how to optimize my query performance. Since my query takes a lot of time to get executed.
    If anyone has any docs for query optimization that is built based on multi provider pls do send it to my email id [email protected]
    regds
    haritha

    hi wond,
    Thanxs a lot for the quick response. Can you let me know how to create secondary indexes on ods and about partioning to be carried out.
    if u have any docs or url can you pls share. my email id [email protected]
    regds
    haritha

  • How to optimize multiple inserts at runtime?

    Hello, guys,
    I have problem of optimizing multiple inserts at runtime using pro* C. The execution has the following form:
    for(int i = 0; i < 100000; i++)
    EXEC SQL EXECUTE IMMEDIATE :QUERY [ i ];
    EXEC SQL COMMIT WOK;
    The QUERY strings are only to be known at runtime, and all of them are to insert into the same table with different VALUES clauses, e.g.
    "INSERT INTO NSMALL (AN,DU,DE,AD,F1,F2,F3,F4,CAL,TYP,TS,TC,TSL,TCE,PC,RDU,ASD,AF,NETIDENT,ES,EF,LS,LF) VALUES('1',1,0,'','','','','','','',NULL,NULL,NULL,NULL,0,0,NULL,NULL,'',TO_DATE('19760101','YYYYMMDD'),TO_DATE('19760101','YYYYMMDD'),TO_DATE('19760101','YYYYMMDD'),TO_DATE('19760101','YYYYMMDD')) "
    I have tried to concategate the queries with ';', enclose them with "begin ... end", and execute them as a single SQL, but got less than 10% improvement(100 inserts/batch)
    Host array and FORALL clause could not been used in this usecase since the table is not known until runtime.
    So I have no idea about this problem, could any one tell me how to optimize?
    Thank you very much!

    You are sending 100,000 insert statements to the database.
    If you want better performance, then send only 1 statement that inserts 100,000 rows.
    So get rid of the for-loop and issue this one instead:
    insert into nsmall
    ( an
    , du
    , de
    , ad
    , f1
    , f2
    , f3
    , f4
    , cal
    , typ
    , ts
    , tc
    , tsl
    , tce
    , pc
    , rdu
    , asd
    , af
    , netident
    , es
    , ef
    , ls
    , lf
    select '1'
          , 1
          , 0
          , null
          , null
          , null
          , null
          , null
          , null
          , null
          , null
          , null
          , null
          , null
          , 0
          , 0
          , null
          , null
          , null
          , to_date('19760101','yyyymmdd')
          , to_date('19760101','yyyymmdd')
          , to_date('19760101','yyyymmdd')
          , to_date('19760101','yyyymmdd')
       from dual
    connect by level <= 100000Regards,
    Rob.

  • Short code snippet uses a lot of CPU. Suggestions on how to optimize?

    What I want to do is to ping a specified address after a specified delay, and then extract the delay and store it in a comma-separated file (optimally along with a timestamp). I could not find any way to make the delay with the ping command in windows XP, so I created a Timer for the task. The program does the trick, but the CPU usage jumps to about 50% when running the application. I'm kind of new to Java, and don't know all the do's and don'ts of threads and infinite loops. Any suggestion to how to optimize the code would be appreciated.
    package WitelcomMonitor;
    import java.io.*;
    import java.util.Timer;
    import java.util.TimerTask;
    public class WitelcomMonitor {
         Timer timer = new Timer(true);
         int counter;
         public WitelcomMonitor(long delay){
              timer.schedule(new TaskPerformer(), 0, 5000);
         class TaskPerformer extends TimerTask{
              public void run(){
                   try {
                        String line;
                        String[] command = {"ping", "-n","3", "123.12.12.1"};
                        Process p = Runtime.getRuntime().exec(command);
                        boolean append = true;
                        BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
                        PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("delayprofile.txt",append)));
                        String subline;
                        int indexEnd,indexStart;
                        while ((line = input.readLine()) != null) {
                             if(line.contains("TTL")){
                                  counter++;
                                  indexStart = indexEnd = line.indexOf("ms");
                                  do {
                                       indexStart--;     
                                  } while (line.charAt(indexStart)!='=');
                                  subline = line.substring(indexStart+1,indexEnd);
                                  out.print(subline.concat(","));
                                  System.out.println(subline.concat(","));               
                             //System.out.println(counter);
                        input.close();
                        out.close();
                   catch (Exception err) {
                        err.printStackTrace();
         public static void main(String[] args){
              long delay = 5000; //milliseconds     
              new WitelcomMonitor(delay);
              while(true);
    }

    Ok, so the while(true) statement by itself drains the CPU, while by asking the main thread to sleep in ten seconds intervals just to sleep again for ten seconds etc. will keep the load on the computer low. Yeah, it worked so I'm happy. I'm not sure though how I can avoid a new thread, as I have to extend TimerTask which requires that I override the run() method. This in turn causes a thread to be run in addition to the main thread. How do you suggest that I avoid this?

  • Toshiba M100 - How to optimize the performance?

    I upgrade my Toshiba M100 from XP to Windows 7 after installing 2GB ram.
    What to do for better performance to my system?

    Hi mate,
    What Toshiba M100 you have? Is it Portege M100, Satellite M100 or what else?
    To enhance the performance of Windows you should defragment the HDD, disable all services that you dont need and disable all start up programs that you dont need.
    If you ask Google for some tips how to optimize, you will find enough! ;)

  • How to optimize export

    Hi Gurus,
    Can anybody tell me that how to optimize the export (exp/imp) and datapump (expdp/impdp) process?
    Which parameter can help to reduce the time in export / import?
    Thanks

    That was a general question asked in one of the interview and i told that we can use parallel option or otherwise use indexes=n, constraints=n (if having the script to create the indexes and constraints after import) indexfile parameter to enhance the performance.
    But he was not satisfied so i thought to ask the same to gurus. May be you can suggest the other parameter.

Maybe you are looking for

  • Websphere JNDI lookup problem

    Hi All Two separate webapps, have different names for Datasources, on the same host and port. Both application work fine independently. When we deploy both applications on the same app server(websphere), whichever we executes first gets its datasourc

  • Canvas Color

    I just started using Illustrator CS4 and I'm finding the canvas color (not the artboard color) a little bright for my eyes' comfort. I'm aware of the ability to change the brightness of the interface, but this does not affect the canvas color. Is the

  • Please Explain ORABPEL-05002 for this process

    I have a very simple BPEL process which pulls messages off the Oracle AQ and sends them on to a BPEL process correlated to the received string data. Step 1. An async partner link on the Oracle AQ to recieve a message Step 2. It waits a minute Step 3.

  • Multilingual Internet Application Support

    OC4J servlet engine does not seem to properly handle multi-bytes character set conversion. new String(source.getBytes("ISO-8859-1"),"utf-8"); The "source" is the Japanese string entered in the "utf-8" encoded JSP page. It returns a kind of garbaged s

  • Migrate a List from SharePoint 2007 to SharePoint 2010

    There's a SharePoint List in the 2007 server having some 32 SiteColumns. None of the columns are of type LookUp i.e., there is no dependency of any column over any other Lists. I just need to copy it as it is to 2010 server. Only problem is that it h