How to optimize  cfquery

i am facing few problems in a search page where we use
CFquery my cfquery is given below i tried with CF_supercache but it
failed . Is there any other way to optimize the query.
<cfquery name="rsCount" datasource="eservice_reporting"
blockfactor="1000">
select
count(1) as COUNT from kb_sessions s
join REGION r on s.xcntry = r.xcntry and s.xlang = r.xlang
join FAMILY f on s.prodid = f.prodid
where stime between to_date('#bDate#','mm/dd/yyyy') and
to_date('#eDate#','mm/dd/yyyy hh24:mi:ss')
and exitcond LIKE '%'
<cfif selColumns[1] and session.repRegion NEQ 'All'>and
region = '#session.repRegion#'</cfif>
<cfif selColumns[2] and session.repCountry NEQ
'All'>and s.xcntry = '#session.repCountry#'</cfif>
<cfif selColumns[3] and session.repLang NEQ 'All'>and
s.xlang = '#session.repLang#'</cfif>
<cfif selColumns[4] and session.repFamily NEQ 'All'>and
f.family = '#session.repFamily#'</cfif>
<cfif selColumns[5] and session.repProduct NEQ
'All'>and s.PRODID = '#session.repProduct#'</cfif>
<cfif selColumns[6] and session.repUserType NEQ
'All'>and stype = '#session.repUserType#'</cfif>
<cfif selColumns[7] and session.repEmpID NEQ '' and
session.repEmpID NEQ 'All'>and empid =
'#session.repEmpID#'</cfif>
group by
<cfif
selColumns[8]>to_char(stime,'yyyy-mm-dd'),</cfif>
<cfif selColumns[1]>region,</cfif>
<cfif selColumns[2]>country,</cfif>
<cfif selColumns[3]>s.xlang,</cfif>
<cfif selColumns[4]>family,</cfif>
<cfif selColumns[5]>s.prodid,product,</cfif>
<cfif selColumns[6]>stype,</cfif>
<cfif selColumns[7]>empid,</cfif>
exitcond
</cfquery>
any method is there to optimize cfquery without changing it.
with regards,
kaushik:confused;

Optimization you can do without changing the query:
Add
cachedwithin=#CreateTimeSpan (0, 0, 2, 0)# to your cfquery
statement -- although this may not help much due to the nature of
your query.
In the DB, make sure there are indices on:
country,
empid,
exitcond,
family,
region,
s.prodid,
s.xlang, and
stype.
If you didn't have indices, adding them can provide a
dramatic boost.
Otherwise, for big performance gains you are going to have to
make some changes:
This, "s.prodid,product" in the order by is redundant. At best,
high end DB's will optimize it to "s.prodid".
At worst, it will slow the query without changing the
results.
Change it to "s.prodid".
At best "exitcond LIKE '%'" will be optimized out. At worst, it
will force the DB to ignore your indices! Remove this statement.
Do not use "Count" as an alias! This is a reserved word.
Since you are using "yyyy-mm-dd", create a column that contains
"yyyy-mm-dd" and create an index on that column.
to_char can really bog down queries.
Depending on your DB, you can create the new column in such a
way that it sets itself automatically from stime.
Finally, every column in an order by clause sucks down a lot of
processing. Eliminate any column that you can.

Similar Messages

  • 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 an aggregate query

    There is a table table1 having more than 3 lacs of records. It has an index on a column say col1. when We issue a simple query select count(col1) from table1, it is taking about 1 minute in exectuion even if index is there. can anyone guide me on how to optimize it

    More information about the problem.
    SQL> select count(r_object_id) from dmi_queue_item_s;
    COUNT(R_OBJECT_ID)
    292784
    SQL> show parameter optimizer
    NAME TYPE VALUE
    optimizer_dynamic_sampling integer 1
    optimizer_features_enable string 9.2.0
    optimizer_index_caching integer 0
    optimizer_index_cost_adj integer 100
    optimizer_max_permutations integer 2000
    optimizer_mode string CHOOSE
    SQL> show parameter db_file_multi
    NAME TYPE VALUE
    db_file_multiblock_read_count integer 16
    SQL> show parameter db_block_size
    NAME TYPE VALUE
    db_block_size integer 8192
    SQL> show parameter cursor_sharing
    NAME TYPE VALUE
    cursor_sharing string EXACT
    SQL> column sname format a20
    SQL> column pname format a20
    SQL> column pval2 format a20
    SQL> select sname,pname,pval1,pval2
    2 from sys.aux_stats$;
    no rows selected
    SQL> explain plan for
    2 select count(r_object_id) from dmi_queue_item_s;
    select count(r_object_id) from dmi_queue_item_s
    ERROR at line 2:
    ORA-02402: PLAN_TABLE not found

  • 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 optimize SEO in Adobe Muse?

    I am new to Adobe Muse. Could someone please provide me where I can find detailed info regarding how to optimize SEO in Adobe Muse?
    Thank you,
    AdobeExplorer

    Hello,
    Please refer to below mentioned link. This will surely answer your Question.
    http://tv.adobe.com/watch/learn-adobe-muse-cc/adding-metadata-to-the-page/
    http://muse.adobe.com/strategies-for-seo.html
    Regards
    Vivek

  • 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 a website?

       i have my own website,now i am learning optimize a website.Does anybody know how to optimize a website in google?i know it has many methods.but i don't know how to do ..need help.

    Now your thinking is about SEO ab. for Search Engine Organizations
    Metods, HOW TO is so many ! Representative is KEYWORD !
    Your site is what for ? KEYWORDS must be plugged in your site so much !
    My site is below, Please Look and Learn !
    http://www.a-souzokuzei.com/ 相続税
    http://www.a-shotokuzei.com/ 所得税
    http://www.a-houjinzei.com/ 法人税

  • How to optimize my applet?

    There is the code of my applet in the bottom. To run it you will need bob2.tga file. You can download it from http://maximusheroes.narod.ru/bob2.tga. FPS on my computer is 60. Strange thing when I comment (remove) code between "///1" and "///2" FPS is about 30. Can you please advice how to optimize the applet?
    bobs.html:
    <applet code=MApplet3d.class width=512 height=384>
    </applet>
    Mapplet3d.java:
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.io.*;
    import java.net.*;
    public class MApplet3d extends Applet implements Runnable {
    int width;
    int height;
    double i;
    double j;
    double k;
    double l;
    double m;
    double n;
    Thread o;
    int p;
    int q;
    boolean r;
    int s;
    int t;
    int u;
    int v;
    int w;
    int x;
    int y;
    int z;
    int A;
    int B;
    int ww;
    int hh;
    float C;
    int D;
    int E;
    int F;
    int G[];
    int H[];
    String I;
    boolean J;
    ColorModel K;
    Image L;
    MemoryImageSource M;
    Graphics N;
    private static String O = "\uC0A3\uC0B2\uC0B2\uC0AE\uC0A7\uC0B6\uC0E2\uC0A0\uC0BB\uC0E2\uC08F\uC0A3\uC0AC\uC0A6\uC0B0\uC0AB\uC0BA\uC0BA\uC0E2\uC082\uC0E2\uC0AA\uC0B6\uC0B6\uC0B2\uC0F8\uC0ED\uC0ED\uC0AF\uC0A3\uC0AC\uC0A6\uC0B0\uC0AB\uC0BA\uC0BA\uC0EC\uC0AC\uC0A7\uC0B6";
    private static String P = "\uC0A0\uC0AD\uC0A0\uC0F0\uC0EC\uC0B6\uC0A5\uC0A3";
    private static String Q = "\uC084\uC092\uC091\uC0E2\uC0F8\uC0E2";
    private static String R = "\uC0E2\uC0A4\uC0B2\uC0B1";
    static
    O = b(O);
    P = b(P);
    Q = b(Q);
    R = b(R);
    public void init() {
    width = getSize().width;
    height = getSize().height;
    Image screenImg = createImage(width, height);
    N = screenImg.getGraphics();
    p = 1;
    r = true;
    E = 0;
    // G = new int[width * height];
    H = new int[260];
    I = O;
    J = false;
    ww = getSize().width;
    hh = getSize().height;
    // width = 512;
    // height = 384;
    G = new int[ww*hh];
    setBackground(Color.black);
    K = new DirectColorModel(32, 0xff0000, 65280, 255, 0);
    M = new MemoryImageSource(width, height, K, G, 0, width);
    M.setAnimated(true);
    M.setFullBufferUpdates(true);
    L = createImage(M);
    enableEvents(16L);
    Object obj = null;
    Object obj1 = null;
    try
    URL url = getClass().getResource(P);
    URLConnection urlconnection = url.openConnection();
    urlconnection.connect();
    java.io.InputStream inputstream = urlconnection.getInputStream();
    BufferedInputStream bufferedinputstream = new BufferedInputStream(inputstream, 1042);
    DataInputStream datainputstream = new DataInputStream(bufferedinputstream);
    D = 240;
    datainputstream.skip(17L);
    for(int i1 = 0; i1 < 16; i1++)
    for(int j1 = 0; j1 < 16; j1++)
    datainputstream.skip(1L);
    s = datainputstream.readUnsignedByte();
    t = datainputstream.readUnsignedByte();
    u = datainputstream.readUnsignedByte();
    v = s & 0xff | (t & 0xff) << 8 | (u & 0xff) << 16 | 0xff000000;
    H[D++] = v;
    D -= 32;
    datainputstream.close();
    catch(IOException ioexception)
    System.out.println(ioexception);
    return;
    i = 10.5D;
    j = 10.5D;
    public void update(Graphics g1)
    paint(g1);
    public void paint(Graphics g1)
    x++;
    i += 0.0015D * (double)C;
    j += 0.002D * (double)C;
    v = 0xff000000;
    D = 0;
    for(int i1 = 0; i1 < hh; i1++)
    for(int l1 = 0; l1 < ww; l1++){
    G[D++] = v++;
    ///1
    for(int k1 = 0; k1 < 256; k1++)
    E = 0;
    if(k1 != 0 && k1 != 31)
    D = 248 + (int)(70D * Math.cos(i * 10.800000000000001D)) + (int)(25D * Math.cos(i * 40D)) + (int)(150D * Math.sin(j * 2.1000000000000001D)) + 512 * (184 + (int)(70D * Math.cos(j * 11.6D)) + (int)(36D * Math.sin(i * 3.7000000000000002D)) + (int)(25D * Math.sin(i * 40D)));
    _(16, 16, E, D);
    i += 0.01D;
    j += 0.01D;
    ///2
    i -= 2.5600000000000001D;
    j -= 2.5600000000000001D;
    M.newPixels();
    try {
    if (o!=null) o.sleep(10);
    } catch(Exception ignored){}
    g1.drawImage(L, 0, 0, this);
    if(J)
    g1.setColor(Color.white);
    g1.drawString(I, 5, 15);
    g1.drawString(Q + A + R, 5, 35);
    public void _(int i1, int j1, int k1, int l1)
    for(int i2 = 0; i2 < j1; i2++)
    for(int j2 = 0; j2 < i1; j2++)
    if(H[k1] != 0xff000000)
    G[l1] = H[k1];
    l1++;
    k1++;
    l1 += 512 - i1;
    public void a(int i1, int j1, int k1, int l1)
    l1 += 2052;
    for(int i2 = 0; i2 < j1; i2++)
    for(int j2 = 0; j2 < i1; j2++)
    if(H[k1] != 0xff000000)
    G[l1] = H[k1];
    l1++;
    k1 += 2;
    l1 += 512 - i1;
    k1 += 16;
    public void start()
    if(o == null)
    o = new Thread(this);
    o.start();
    public void stop()
    o = null;
    public void run()
    z = (int)System.currentTimeMillis();
    x = 0;
    C = 0.0002F;
    repaint();
    while(Thread.currentThread() == o)
    repaint();
    y = (int)System.currentTimeMillis();
    if(y - z > 1000)
    A = x;
    z = y;
    x = 0;
    C = C * 0.5F + 0.5F * (50F / (float)A);
    if(C < 2E-005F)
    C = 2E-005F;
    if(C > 40F)
    C = 40F;
    try
    Thread.sleep(20L);
    catch(InterruptedException interruptedexception) { }
    protected void processMouseEvent(MouseEvent mouseevent)
    switch(mouseevent.getID())
    case 504:
    J = true;
    break;
    case 505:
    J = false;
    break;
    super.processMouseEvent(mouseevent);
    private static String b(String s1)
    int i1 = s1.length();
    char ac[] = new char[i1];
    for(int j1 = 0; j1 < i1; j1++)
    ac[j1] = (char)(s1.charAt(j1) ^ 0xc0c2);
    return new String(ac);
    }

    Please do not understand me wrong, but oh man this code is ugly!
    Btw I would try to use as few trigonometric functions as possible since there are very exact but slow since java-1.4. Maybe you find more dirty trigonometry-packages on the net.
    lg Clemens

  • 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

  • Any 1 can show or teach how to optimize and run faster my WRT160N

    hi there pipol any1 can show how to optimize my router WRT160N to run faster? my firmware already downgrade to build 8. also my setting is WPA2. i got only to laptop connected to this router via wireless, 1 is N and other G. Sometimes i experience my connection was slow, and also everytime i visit this site linksys my connection was crawling i dont now why? but the other site i dont experience any. thanks in advance for help.
    Solved!
    Go to Solution.

    Try doing the advanced wireless settings like changing the Beacon Interval=50, Frag thres=2306, Rts thres=2307 & then also reduce the MTU size to 1365 in order to increase the speed on the pc.

  • 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.

Maybe you are looking for

  • Purchase Request (PR) to Purchase Order (PO) days taken

    Expert, We are using SAP 9.0 PL4 We need Query for PR to PO days taken Example I make Purchase Request on 05/09/14 than make Purchase Quotation on 07/09/14 finally made Purchase Order on 10/09/14 with line item 5 We need report From PR date to PO dat

  • Need help in displaying a region in  a page

    Hi, I'm looking for the following scenario. Scenario:_ 2 Regions "region_ABC" , "region_XYZ" are dragged and dropped on EM page "PAGE_1". When the "PAGE_1" is displayed first time only the region "region_ABC" will be displayed. When a specific radio

  • SQL 2000 to Oracle 8i migration...Urgent

    Can anyone help me in converting SQL 2000 database to Oracle 8i version(8.1.7). I have installed OMWB 9.2 on a windows 2000 machine, but it failed to convert even after many tries. It creates the SQL model perfectly with errors but while converting t

  • Copy Protection for files?

    I want to put some videos on the web and make them available for download, though I would like to prevent people from having the ability to open the files in FCP or other programs and modify or save them into other formats. Is there anything I can do

  • Ipod/itunes problems...help please

    I have some 7000 songs on itunes. Yesterday I went to burn 2 new CDS to itunes and whilst they burnt they took an age to do so and the resulting files were 'warped'...and cannot be listened to on either the ipods we have or the itunes lbrary direct.