New whitepaper - Performing Queries in JE

All,
Chao Huang, a member of the JE team, has written a new whitepaper, new and updated as of July 2009, called Performing Queries in Oracle Berkeley DB Java Edition. The whitepaper takes common SQL queries and shows how to execute the same logic using the Direct Persistence Layer (DPL). The goal is to give users who are familiar with SQL some help in learning how to use the DPL. We hope it's useful!
The JE team

All,
Chao Huang, a member of the JE team, has written a new whitepaper, new and updated as of July 2009, called Performing Queries in Oracle Berkeley DB Java Edition. The whitepaper takes common SQL queries and shows how to execute the same logic using the Direct Persistence Layer (DPL). The goal is to give users who are familiar with SQL some help in learning how to use the DPL. We hope it's useful!
The JE team

Similar Messages

  • Perform queries to external web sites.

    Hello,
    I would to know whether there is any way to perform queries to different web sites from a Java program.
    To make it clear, i want to perform a search query to a business directory(yellowpages.com), in order to get back the list of businesses available at a specific area.
    I have to mention that i couldn't find any web-services available for that for the UK.
    Thank you for your help and sorry in case that the topic should have been posted somewhere else.
    Edited by: Alkon on Feb 29, 2008 8:55 AM

    Hello,
    I would to know whether there is any way to perform queries to different web sites from a Java program.
    To make it clear, i want to perform a search query to a business directory(yellowpages.com), in order to get back the list of businesses available at a specific area.
    I have to mention that i couldn't find any web-services available for that for the UK.
    Thank you for your help and sorry in case that the topic should have been posted somewhere else.
    Edited by: Alkon on Feb 29, 2008 8:55 AM

  • Possible to "create" new record from queries

    hi ,
    is it possible that i can get a "new" record using queries instead of thru pl/sql ?
    i have the following table :
    tbl1 :
    id time1 time2 type
    1 07-10-2006 03:00:00am 07-10-2006 04:00:00 am A
    1 07-10-2006 04:01:00am 07-10-2006 04:45:00 am B
    1 07-10-2006 04:50:00am 07-10-2006 07:00:00 am A
    tbl2
    id time type
    1 07-10-2006 05:00:01am K
    notice that tbl2 record falls between time1 & time2 of tbl1's 3rd record and i want to create a "new" record in tbl1 from tbl2
    the final results would be :
    id time1 time2 type
    1 07-10-2006 03:00:00am 07-10-2006 04:00:00 am A
    1 07-10-2006 04:01:00am 07-10-2006 04:45:00 am B
    1 07-10-2006 04:50:00am 07-10-2006 05:00:01am A
    1 07-10-2006 05:00:01am 07-10-2006 07:00:00 am K
    tks & rgds

    What happens if the time from tbl2 is not include into any interval from tbl1 ?
    Anyway, you can try something like following - with MERGE -, but it will work only in case of the time from tbl2 is include into an interval from tbl1 :
    SQL> select * from tbl1;
            ID TIME1               TIME2               T
             1 07/10/2006 03:00:00 07/10/2006 04:00:00 A
             1 07/10/2006 04:01:00 07/10/2006 04:45:00 B
             1 07/10/2006 04:50:00 07/10/2006 07:00:00 A
    SQL> select * from tbl2;
            ID TIME1               T
             1 07/10/2006 05:00:01 K
    SQL>
    SQL> merge into tbl1 a
      2  using (select b.rowid rwd, b.id, b.time1, c.time1 time2, b.type
      3         from   tbl1 b, tbl2 c
      4         where  b.id=c.id
      5         and    c.time1 > b.time1
      6         and    c.time1 < b.time2
      7         union all
      8         select null rwd, c.id, c.time1, b.time2 time2, c.type
      9         from   tbl1 b, tbl2 c
    10         where  b.id=c.id
    11         and    c.time1 > b.time1
    12         and    c.time1 < b.time2) d
    13  on (a.rowid=d.rwd)
    14  when matched then update set a.time2=d.time2
    15  when not matched then insert (a.id, a.time1, a.time2, a.type) values (d.id, d.time1, d.time2, d.type);
    2 rows merged.
    SQL>
    SQL> select * from tbl1;
            ID TIME1               TIME2               T
             1 07/10/2006 03:00:00 07/10/2006 04:00:00 A
             1 07/10/2006 04:01:00 07/10/2006 04:45:00 B
             1 07/10/2006 04:50:00 07/10/2006 05:00:01 A
             1 07/10/2006 05:00:01 07/10/2006 07:00:00 K
    SQL> Nicolas.

  • (new?) performance problem using jDriver after a Sql Server 6.5 to 2000 conversion

    Hi,
    This is similar - yet different - to a few of the old postings about performance
    problems with using jdbc drivers against Sql Server 7 & 2000.
    Here's the situation:
    I am running a standalone java application on a Solaris box using BEA's jdbc driver
    to connect to a Sql Server database on another network. The application retrieves
    data from the database through joins on several tables for approximately 40,000
    unique ids. It then processes all of this data and produces a file. We tuned
    the app so that the execution time for a single run through the application was
    24 minutes running against Sql Server 6.5 with BEA's jdbc driver. After performing
    a DBMS conversion to upgrade it to Sql Server 2000 I switched the jDriver to the
    Sql Server 2000 version. I ran the app and got an alarming execution time of
    5hrs 32 min. After some research, I found the problem with unicode and nvarchar/varchar
    and set the "useVarChars" property to "true" on the driver. The execution time
    for a single run through the application is now 56 minutes.
    56 minutes compared to 5 1/2 hrs is an amazing improvement. However, it is still
    over twice the execution time that I was seeing against the 6.5 database. Theoretically,
    I should be able to switch out my jdbc driver and the DBMS conversion should be
    invisible to my application. That would also mean that I should be seeing the
    same execution times with both versions of the DBMS. Has anybody else seen a
    simlar situation? Are there any other settings or fixes that I can put into place
    to get my performance back down to what I was seeing with 6.5? I would rather
    not have to go through and perform another round of performance tuning after having
    already done this when the app was originally built.
    thanks,
    mike

    Mike wrote:
    Joe,
    This was actually my next step. I replaced the BEA driver with
    the MS driver and let it run through with out making any
    configuration changes, just to see what happened. I got an
    execution time of about 7 1/2 hrs (which was shocking). So,
    (comparing apples to apples) while leaving the default unicode
    property on, BEA ran faster than MS, 5 1/2 hrs to 7 1/2 hrs.
    I then set the 'SendStringParametersAsUnicode' to 'false' on the
    MS driver and ran another test. This time the application
    executed in just over 24 minutes. The actual runtime was 24 min
    16 sec, which is still ever so slightly above the actual runtime
    against SS 6.5 which was 23 min 35 sec, but is twice as fast as the
    56 minutes that BEA's driver was giving me.
    I think that this is very interesting. I checked to make sure that
    there were no outside factors that may have been influencing the
    runtimes in either case, and there were none. Just to make sure,
    I ran each driver again and got the same results. It sounds like
    there are no known issues regarding this?
    We have people looking into things on the DBMS side and I'm still
    looking into things on my end, but so far none of us have found
    anything. We'd like to continue using BEA's driver for the
    support and the fact that we use Weblogic Server for all of our
    online applications, but this new data might mean that I have to
    switch drivers for this particular application.Thanks. No, there is no known issue, and if you put a packet sniffer
    between the client and DBMS, you will probably not see any appreciable
    difference in the content of the SQL sent be either driver. My suspicion is
    that it involves the historical backward compatibility built in to the DBMS.
    It must still handle several iterations of older applications, speaking obsolete
    versions of the DBMS protocol, and expecting different DBMS behavior!
    Our driver presents itself as a SQL7-level application, and may well be treated
    differently than a newer one. This may include different query processing.
    Because our driver is deprecated, it is unlikely that it will be changed in
    future. We will certainly support you using the MS driver, and if you look
    in the MS JDBC newsgroup, you'll see more answers from BEA folks than
    from MS people!
    Joe
    >
    >
    Mike
    The next test you should do, to isolate the issue, is to try another
    JDBC driver.
    MS provides a type-4 driver now, for free. If it is significantly faster,
    it would be
    interesting. However, it would still not isolate the problem, because
    we still would
    need to know what query plan is created by the DBMS, and why.
    Joe Weinstein at BEA
    PS: I can only tell you that our driver has not changed in it's semantic
    function.
    It essentially send SQL to the DBMS. It doesn't alter it.

  • Problem with "new Group()" performance

    Hello
    I need to create many spark.components.Group objects (more than 10000) and have some performance problem. In many cases new object was created in 0-5 ms, but sometimes in 266-700 ms.
    This is output from my test app (code below):
    [Time] - [Count]
    0 - 91035
    1 - 7308
    2 - 393
    3 - 365
    4 - 408
    5 - 404
    6 - 66
    7 - 3
    8 - 3
    9 - 2
    10 - 1
    12 - 1
    13 - 1
    16 - 1
    19 - 1
    24 - 1
    39 - 1
    63 - 1
    67 - 1
    210 - 1
    260 - 1
    266 - 1
    690 - 1
    And code:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768" applicationComplete="windowedapplication1_applicationCompleteHandler(event)">
        <fx:Script>
        <![CDATA[
            import mx.events.FlexEvent;
            import spark.components.Group;
            private var container:Array = new Array();
            protected function windowedapplication1_applicationCompleteHandler(event:FlexEvent):void {
                var map:Object = new Object();
                var i:int, start:int, stop:int;
                var grp:Group;
                for(i = 0; i != 100000; i++) {
                    start = new Date().getTime();
                    grp = new Group();
                    stop = new Date().getTime();
                    if (!map.hasOwnProperty(stop - start)) {
                        map[stop - start] = 0;
                    map[stop - start]++;
                    container.push(grp);
                for (var key:* in map) {
                    trace(key + " - " + map[key]);
        ]]>
        </fx:Script>
    </s:Application>
    Can you test this code in yours computers?
    Anybody know where is a problem? I don't have any applications run in background. etc...
    Testes on SDK: 4.0 (default in Flash Builder 4 b 2), 4.0 build 13875, 4.1 build 14741
    Mariusz Dalewski

    Here are my results with a few classes:
    spark.components.Group:
    0 - 87676
    1 - 10563
    2 - 340
    3 - 346
    4 - 349
    5 - 480
    6 - 222
    7 - 6
    8 - 4
    9 - 1
    10 - 1
    11 - 1
    76 - 1
    13 - 1
    14 - 2
    16 - 1
    12 - 1
    407 - 1
    472 - 1
    26 - 1
    94 - 1
    31 - 1
    mx.containers.Canvas:
    0 - 79601
    1 - 18534
    2 - 287
    3 - 258
    4 - 284
    5 - 383
    6 - 328
    7 - 243
    8 - 42
    9 - 11
    130 - 1
    11 - 2
    324 - 1
    13 - 2
    14 - 3
    10 - 3
    18 - 1
    12 - 9
    21 - 1
    741 - 1
    504 - 1
    27 - 2
    28 - 1
    351 - 1
    mx.core.UIComponent:
    0 - 89460
    1 - 8748
    2 - 337
    3 - 382
    4 - 317
    5 - 527
    6 - 209
    7 - 3
    8 - 2
    9 - 3
    42 - 1
    99 - 1
    12 - 1
    462 - 1
    14 - 2
    15 - 1
    116 - 1
    118 - 1
    124 - 1
    30 - 1
    31 - 1
    Sprite:
    0 - 98957
    1 - 1030
    2 - 1
    5 - 11
    6 - 1
    spark.primitives.Rect:
    0 - 99598
    1 - 402
    spark.primitives.supportClasses.GraphicElement:
    0 - 99598
    1 - 402
    As Bonzo mentioned this doesn't seem to be a Group problem as Canvas also has some long times.  UIComponent is lighter than both Canvas and Group and it still has  a couple entries longer than a few ms.  Notice that using Sprite or GraphicElement is much faster.  GraphicElement is very lightweight, are you able to use it instead of a Group? 100,000 Groups seems like a lot, can you explain your use case, maybe there is a way to use virtual layout to minimize the number needed at any one time?
    I think the container.push() call might be causing a lot of the delay, if you use:
    private var container:Array = new Array(100000);
    container[i] = grp;
    You should see less large delay times.  It might be good to try using a Vector instead of an Array like Bonzo suggested too.

  • Brand new with performance issues -- programs not responding, system hanging

    Just this morning I began migrating from a Dell Inspiron 1525 laptop that has been generally reliable for the better part of 3 years (monitor housing is literally falling apart but still works great... check E-Bay later for spare parts! lol)... migrating to a Toshiba Satellite C655D-S5136 laptop running Windows 7 64-bit.  It's literally right out of the box 5 hours ago and I've been reinstalling programs, transferring files, etc.
    The problem is that I'm already noticing a lot of performance issues.  The system (and/or programs) seem to get caught often... resulting in frequent "Program not responding" messages (some of which the system manages to bypass)... and a few of the "This program closed unexpectedly" or "This program stopping responding... do you want to check online for a solution or just close the program?" messages.
    This is happening on multiple programs... tax prep software TaxAct update dialog hangs after 256 bytes downloaded every time, AVG Anti-Virus was hanging although never gave me a not responding message, Internet Explorer has stopped responding a couple times, Windows Live Mail did often, especially when I was using IMAP (since changed to POP3 and problem seems to have resolved but still).  Even opening the start menu a few seconds after plugging in an external hard drive lagged the system like hell for a full two minutes until it caught up with itself.
    This is unacceptable in a brand new machine.  I was getting a few errors like this on my Dell every now and then but I chalked it up to an old machine that had never been wiped and had a failing hard disk.  I understand the computer moving slower, especially as I've been installing a lot, running antivirus, downloading all at once, but no way programs should simply stop responding this often.  I could do twice the activity on my Dell and have no issues.
    I've uninstalled several of the preloaded programs... the antivirus, quickbooks, etc.  I've also disabled and/or uninstalled several of the other programs like Toshiba Reeltime and Toshiba Zoom Manager or whatever that was.  Nothing has seemed to help.  And that's not surprising... the speed is great, it's that programs are getting caught so often, sometimes every time or every other time I open up a program.
    Is this a Windows 7 thing? (This is first time using Windows 7, coming from Vista).  Is it a Satellite thing?
    Anyone have any suggestions?  Is it possible there's just some component that's bad?  Processor, RAM, etc.?
    Thanks... very frustrated!

    I may have found a solution. I changed my startup programs and stopped some of the Toshiba software from running at startup. The ones I stopped are listed below. I have used the laptop heavily for two days now and have not had any problems. It actually runs very fast. I hope this will help.
    Toshiba Reel Time
    Toshiba Sleep
    Toshiba PC Health Monitor
    Toshiba WebCamera App.
    Toshiba Power Saver
    Toshiba Message Center
    Toshiba Service Station
    SmartFaceVWatcher
    Toshiba Online Backup
    Toshiba Zooming Utility
    Toshiba eco Utility
    Toshiba App Place 
    Message Center
    For people that don't know how to change these, here are the instructions.
    Click Start > Type msconfig in the search box > open msconfig > click on the startup tab > remove the checkmarks next to the above programs > restart computer.
    Doing this may not fix your problems, but it did fix mine.

  • New concept performance

    Hi, all
    Can you describe difference in performance when using 3.x emulated and migrated DS and old and new concept IS?
    It is very important for us because we start new project on 2004s, and should choose Data flow concept.
    Loads of large amount of data are supposed.

    In general, I would choose the new data flow concept as it has tons of benefits over the old concept. The performance while loading, in general, is more parallelized with the new data flow, so you will generally get a ton better performance. You can run some tests if you need numbers, but I think you'll find the new data flow concept a ton better to work with.

  • Downloading new content + Performance

    A couple of questions:
    Are apps built with Packager for IPhone able to download new content and save it to the app directory? eg pictures, text, videos etc?
    What kind of performace can be acheived? Can this sort of smoothness be achieved:
    http://www.youtube.com/watch?v=1yexxWvPtZI
    thanks.

    Hi David,
    we are in the middle of developing an app that downloads content from to the device for offline viewing, and the performance of the file and filestream api's is pretty good.
    The performance of the app in total really depends on how it was developed, and how optimized you can make it.
    Greetings,
    Kriz

  • Logic 7.2.3 and new autoload performance weirdness

    I think it might be my new autoload i have created, but i am having really weird system performance monitor readings compared to activity monitor. Logic only seems to be using one cpu for the most part, and will not distribute to the other.
    I downloaded the sculpture benchmark II post song, and Logic does use both CPU's on that. So i am leaning towards my autoload. Man i don't want to rebuild it. ERRR!
    Here is what i have done. I have tried the autoload on both intel and PPC macs. same results. right bar 1/2 way up and the left bar 1 mark. i have added Space Designers to try to force the other cpu to work, but it just maxes out the Right CPU on both PPC and intel. then i get the Logic error.
    it is not a 10.4.9 issue. the test was run on 10.4.8 with both machines.
    I have trashed my prefs. it seems to work for about 10 secs correctly distributing the load, and the straight to the right cpu.
    does anyone have advise, or have you experienced this?

    well it appears that it might just be a corrupt autoload. i am playing back older songs, and they are working correctly.
    this weekend i am going to spend around 4 hours creating the new autoload.
    i can't believe that after the recording delay, the rewire, the total mix creation in the env that i am having this issue, but i have gotten a few new ideas for recent post of others.
    does anyone have a preferred way of creating the autoload. should i run the system setup? should i just pick a templated and start from there?
    advice please.

  • 8.0.2 and new ram, performance boost or waste of time?

    Hi all,
    I am going to add more ram to my MacBook. I understand that my MacBook officially only accepts of 2GB of ram (2x 1 gig sticks)I have read that many folks have put 4 gigs in a 2x2 gig matched pair configuration in there machine to get a maximum of 3 gigs. As I understand it this is not a supported configuration.
    I don't mind paying for 4 gigs to only 3 my question is, would this make Logic unstable? I only use this machine for Logic and the apps that come with Logic Studio 1. I only go on line with it for updates and such so my main concern is keeping this machine stable for Logic.
    Also I am imaging that increasing ram from 1 gig to even just the 2 that is officially supported will give me a bit of a performance boost but in what ways will I notice it in relation to Logics performance?
    Also any recommendations for RAM in the UK would be very welcome.
    Sorry for such a dull question,
    Regards,
    Jay
    Message was edited by: NoteFarm

    Hey Notefarm, a lot of my friends ( including myself and I noticed somebody else linked it here as well the other day ) use Crucial because of the macapp you can download which will tell you want you can have RAM wise and how much it's gonna cost you.
    http://www.crucial.com/

  • 11g Upgrade - removal and new parameter list queries

    Hi All,
    We are planning to upgrade the 10.2.0.4 E Business suite (11.5.10.2. ) database to 11.2.0.1.
    We have few removal and new parameter list in 11g database based on the note 216205.1
    We will be having the compatible mode as 10.2.0 before and after the upgrade until the system gets stable. So until we change the compatible to 11.2.0, do we need to have the parameters in the removal list or we can remove that even if we have the compatible as 10.2.0 during the upgrade.
    There are also two new parameters optimizerautostats_job=false and sec_case_sensitive_logon = FALSE.
    Please let us know if we can have these new /removal parameter changes when we have the compatible as 10.2.0 in 11g database.
    Thanks & Regards,
    Rakesh

    Rakesh,
    Please let us know if we can have these new /removal parameter changes when we have the compatible as 10.2.0 in 11g database.You can have those parameters, and you can remove it later once you are done with the upgrade.
    Note: 881505.1 - Oracle Applications Release 11i with Oracle 11g Release 2
    Adjust the Initialization Parameter File for the New Release
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10819/afterup.htm#CEGHAAFH
    Thanks,
    Hussein

  • New whitepaper: Oracle9iAS Best Practices

    Check out the newly published whitepaper on Oracle9iAS Release 2 best practices:
    http://otn.oracle.com/products/ias/ohs/collateral/r2/bp-core-v2.PDF
    Ashesh Parekh
    Oracle9iAS Product Management

    Carl,
    There is really no set number or best practice for the number of segments. It is driven by the needs of your organization based upon reporting requirement, collective bargaining agreements, the degree of organizational change occurring within the enterprise, etc. I do believe that "less" segments usually makes more sense from a maintenance and ease of use perspective. Jobs are available across the Business Group, unlike positions, which are subordinate and specific to jobs and organizations...so you'll be maintaining less of them (hopefully).
    Regards,
    Greg

  • New IMac Performance

    Is a New IMac with 4G of Ram and a 7200rpm 500g HD enough to run FCP 5.1 DVD Studio Pro?
    My 5 year old G5 crapped out (fans running wild) Kernal panics all kinds of problems.

    I certainly hope so, I'm running that software on a 2.5 year-old iMac with 2G of RAM and a 500G HD and it runs like a champ. I dare say, though, a newer machine may very well be faster (mine is 2.33GHz w/ 667MHz bus).

  • Static method,new thread performance question

    Hey guys i just have two questions about two methods used in many controllers/servlets in my app:
    1-what is the difference between calling a static method in a util class or a non static method (like methods dealing with dates i.e getting current time,converting between timezones), which is better ? 2-what is the difference between calling a method(contain too many logic like sending emails) in the controller directly or running this method in a different thread ?

    cs.student wrote:
    Hey guys i just have two questions about two methods used in many controllers/servlets in my app:
    1-what is the difference between calling a static method in a util class or a non static method (like methods dealing with dates i.e getting current time,converting between timezones), which is better ?Depends on the design. It's impossible to say straight why one way would be better than another. Programming isn't that straight forward.
    2-what is the difference between calling a method(contain too many logic like sending emails) in the controller directly or running this method in a different thread ?Threads can be run at the same time. So what you're asking is "what's the difference between doing one thing after another and doing two things at the same time".

  • NEW WHITEPAPER: Using Power BI in a Hybrid Environment

    This article
    details the tasks necessary to implement Microsoft Power BI for Office 365 in a hybrid environment. It describes best practices for security, networking, and component architecture for building a hybrid business intelligence (BI) environment by using a
    combination of Microsoft Office 365, Microsoft Azure, and on-premises data sources.
    Written by:
    Joseph D'Antoni and Stacia Misner
    To review the document, please download the Using Power BI in a Hybrid Environment Word document.
    Carla Sabotta

    Hi,
    Thanks for your information.
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

Maybe you are looking for