Design Question:  huge column is slowing app, what's best way to speedup?

Hello All,
I have a DPL application that is getting a bit heavy due to one column and needs to be tweaked and wanted to ask people's advice on the best practice to speeding it up. I have an entity that is tracking versions of statistical data.
@Entity
public class ResourceVersion {
     @PrimaryKey(sequence = "resource_sequence")
     @XmlAttribute
     private Long id; //internal primary key
     private byte[] data; //the field slowing everything down.
     @SecondaryKey(relate=Relationship.MANY_TO_ONE)
     private String resourceId; //externally visible key.
     private String name; //field that's actually needed.
     //2 more fields that aren't relevant to example.
     //some getters and setters.
The byte[] data field can be several megabytes and is making the application slow as my DAO layer is processing a few megabytes of data and then discarding them for the web layer.
To abstract the problem:
* I have a CRUD application with a single entity.
* My page that lists the entities is getting slow.
* I have a bean with 6 fields.
* I need 3 of the fields for the page that's listing the entities. The other 3 are only used by a tiny subset of the application.
I need to stop retrieving the large data field for pages that don't need it. I need a subset of my bean.
The way I see it, I have 2 options:
1. Figure out a way using the DPL to retrieve a subset of the fields. Is it even possible?
2. Break the bean into 2, one containing the fields needed for listing and one bean that just stores the data.
My assumption is that I have to break the byte[] field into it's own entity. I thought I'd just quickly post to make sure there's not an easier option.
Thanks,
Steven

Hi Steven,
You're correct that BDB does not support partial record read/write, and therefore the best solution is to break the large blob out into a separate entity (or even store it in a file).
See:
http://www.oracle.com/technology/products/berkeley-db/faq/je_faq.html#3
Partial data is not supported at all for the DPL, but as noted in the FAQ the limited support for it in the base API provides very little performance advantage, if any at all.
--mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Whats the best way to create USER variable in BI Apps?

    I have just installled BI Apps and am trying to integrate EBS R12 with OBIEE 11g
    We have USER variable already defined in the BI Apps rpd.
    In EBS Security context init block i need to define USER variable, but when i define it... it says *'USER' has already been defined in the variable "Authentication"."USER"*
    Whats the best way to create USER variable for EBS Security Context init block?
    1) Delete the existing USER variable and then define a new one ( in this case all the places where USER variable is getting used in the rpd would become <missing>)
    And i was told that it should not be done.
    Let me know how can it be done.
    Thanks
    Ashish

    Disable existing Init block and then double click on USER variable and hit on NEW... button to create new Init block
    Thanks
    Edited by: Srini VEERAVALLI on May 1, 2013 4:18 PM

  • My business has 100 ipads 3g with no control at the moment - i need to now control the ipads - what apps they can use - and restict certian use on the ipads - whats the best way to do this - it will need to be done remotley.

    my business has 100 ipads 3g with no control at the moment - i need to now control the ipads - what apps they can use - and restict certian use on the ipads - whats the best way to do this - it will need to be done remotley.

    MDM  -- moble device management 
    MDMs
    Airwatch, Meraki, MobileIron, Profile Manager on OS X Server, or Zenprise
    For a comparison see this page:
    http://www.enterpriseios.com/wiki/Comparison_MDM_Providers
    Airwatch
      http://www.air-watch.com/
    Meraki -- A free MDM   [ expect lots of email and phone calls about upgrades ]
      http://www.meraki.com/products/systems-manager/
      https://discussions.apple.com/thread/4067210?tstart=0
      Good howto by Sergio Sosa.
      https://discussions.apple.com/thread/2594001?start=15&tstart=0
    MobileIron
      http://www.mobileiron.com/
    Profile Manager by Apple
    Zenprise
      http://www.zenprise.com/

  • Whats the best way to go about learning C?

    I'm an almost complete noob when it comes to programming. I did write a few simple pascal programs about 10 years ago at school, thats about it.
    What I hope to achieve is (hopefully) not that complex, but I'm not sure where to start learning. My reason for wanting to learn is this: I really love MOC (music on console) but I ended up wanting a GUI player which still worked without the mouse. Every one I tried just isnt a patch on MOC, IMO, or just has one or other feature that doesnt work without a mouse. So it occurred to me, I have the source code for all these GUI players and the source for MOC, perhaps I can "modify" MOC and create a GUI version, or alternatively write some kind of front end to MOC.
    So far, I have had a go with Glade and Anjuta IDE, but my knowledge of C being almost nonexistent is making things tough. I'm probably trying to do it wrong anyway, my thought was to create a GUI in glade and make it call functions from the moc source... :?:
    So I need a crash course in C programming with Glade (I think?) and I'm not sure what the best way to proceed is.
    Any tips on how best to learn? I ask here because you all seem to be the most knowledgable group I can think of

    I'm not trying to discourage you, but the idea of Frankensteining all that C source into your own custom GUI music player is likely to cause nothing but hours of frustration. C is a great language for system programming, but for most application software it's far too low level and for most beginners it's far too dangerous (it lets you do bad things that can kill your app in dozens of intersting and extremely hard to debug ways).
    What I would suggest is that you first off break the problem in half. Use a client/server approach. The server does all the low-level heavy lifting of decoding/decompressing the music files and sending them to your audio subsystem. Something like Music Player Daemon (MPD) is perfect for the server part and is specifically designed to be controlled by a separate client program.
    Then all you have to do is write the GUI client of your dreams. For that I would recommend something like Python plus the GUI library of your choosing (Qt, GTK, wxWidgets, etc. all have nice Python bindings). Python is a far easier beginner language than C and can do much more work with much less code. You'll spend less time mucking around looking for memory leaks and invalid pointer references and more time actually making your GUI do useful work Oh, and there just happens to be a Python MPD client library so the task of communicating with the server gets even easier.

  • I am moving from PC to Mac.  My PC has two internal drives and I have a 3Tb external.  What is best way to move the data from the internal drives to Mac and the best way to make the external drive read write without losing data

    I am moving from PC to Mac.  My PC has two internal drives and I have a 3Tb external.  What is best way to move the data from the internal drives to Mac and the best way to make the external drive read write without losing data

    Paragon even has non-destriuctive conversion utility if you do want to change drive.
    Hard to imagine using 3TB that isn't NTFS. Mac uses GPT for default partition type as well as HFS+
    www.paragon-software.com
    Some general Apple Help www.apple.com/support/
    Also,
    Mac OS X Help
    http://www.apple.com/support/macbasics/
    Isolating Issues in Mac OS
    http://support.apple.com/kb/TS1388
    https://www.apple.com/support/osx/
    https://www.apple.com/support/quickassist/
    http://www.apple.com/support/mac101/help/
    http://www.apple.com/support/mac101/tour/
    Get Help with your Product
    http://docs.info.apple.com/article.html?artnum=304725
    Apple Mac App Store
    https://discussions.apple.com/community/mac_app_store/using_mac_apple_store
    How to Buy Mac OS X Mountain Lion/Lion
    http://www.apple.com/osx/how-to-upgrade/
    TimeMachine 101
    https://support.apple.com/kb/HT1427
    http://www.apple.com/support/timemachine
    Mac OS X Community
    https://discussions.apple.com/community/mac_os

  • I want to connect a Mac mini to a Samsung 40", Whats the best way to do this?

    I want to connect a Mac mini to a Samsung 40" LED tv to use as the monitor, whats the best way of doing this?

    Understand that there is one HDMI port on your TV that is specifically designated for PC connectivity. The order that the TV or Mini are powered on may determine your results. For your specific TV model, check buyer reviews on Amazon or elsewhere that can include optimum TV/Computer settings adjustment for improved viewing results.

  • Whats the best way to get a big text file in a CLOB variable?

    Hi,
    I have a very premitive type of question.
    I have a big text file, say 30 MB, in a Unix directory (Solaris). I want to get the whole text of that file in a CLOB variable.
    I saw the procedure dbms_lob.loadfromfile/loadclobfromfile. In both these cases, according to the documentation, the target where is collect the data will be a BLOB and not a CLOB. So, I have to convert that blob into a clob.
    If I want to avoid all this conversion process, whats the best way to get a text from a file into a CLOB variable?
    Please suggest.
    Regards

    In addition, LoadFromFile is overloaded to handle both BLOB and CLOB:
    PROCEDURE LOADFROMFILE
    Argument Name                  Type                    In/Out Default?
    DEST_LOB                       BLOB                    IN/OUT
    SRC_LOB                        BINARY FILE LOB         IN
    AMOUNT                         NUMBER(38)              IN
    DEST_OFFSET                    NUMBER(38)              IN     DEFAULT
    SRC_OFFSET                     NUMBER(38)              IN     DEFAULT
    <BR>
    PROCEDURE LOADFROMFILE
    Argument Name                  Type                    In/Out Default?
    DEST_LOB                       CLOB                    IN/OUT
    SRC_LOB                        BINARY FILE LOB         IN
    AMOUNT                         NUMBER(38)              IN
    DEST_OFFSET                    NUMBER(38)              IN     DEFAULT
    SRC_OFFSET                     NUMBER(38)              IN     DEFAULT

  • I burned a playlist to a data CD using itunes 11 but what is best way to get it import it into another computer with itunes running?

    I burned a playlist to a data CD using itunes 11 but what is best way to get it import it into another computer with itunes running?  I get an "X" when trying to copy to the "automatically add to itunes" folder on the 2nd computer.

    ok... so i i just made sure all my music is all together in 1 folder and i am going to trash my old music folder that is in the itunes folder... and follow your directions - let itunes start w/new library and bring my music in. Well, last little hurdle/question. I noticed that the place where my itunes library is - on an external drive doesnt have much space left on it. The place where i gathered all my music together in order to start fresh - is a different external drive and has LOTS of free space on it.
    SO... i now would like to just keep all that freshly compiled clean music right where it is but in advanced preferences I want to point to that new folder on the drive that has so much more space. So... should i delete the old music then go into itunes with a blank library and change the folder in preferences - quit and go back in and then follow your steps to loading my music? If i change the setting of where itunes looks for the music - that doesn't wipe out the old stuff... it just mixes it all up together right? I dont want that!!
    i promise this is the last question - i would love to fix this problem tonight and just be DONE!
    Thanks in advance for your patience and knowledge!!
    Lisa

  • What is best way dealing with large tiff file in OSX Lion?

    I'm working with large tiff  file (engineering drawing), but preview couldnt handle (unresponsive) this situation.
    What is best way dealing with large tiff file in OSX Lion? (Viewing only or simple editing)
    Thx,
    54n9471

    Use an iPad and this app http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=400600005&mt=8

  • I want to run Quicken through Windows on my macbook pro, whats the best way to do this?

    I want to run Quicken 2012 through Windows on my macbook pro, whats the best way to do this?
    I have been looking at Parallels or VMware in order to use Windows but then I will also need to get a Windows license. Just looking for the most inexpensive way possible as this will probably be the only Windows app I run.
    Also looking at this CrossOver software which says you dont need Windows license. Anyone used this before? had success?

    CrossOver's website has a list of software it has certified as working or working with known issues - Quicken 2012 has a bronze rating meaning it runs but with enough issues that it isn't recommended. In other words, "Run away!"
    Get a copy of Windows 7 OEM from Amazon or New Egg and give it a try with VirtualBox (an open source virtualization program). If VirtualBox doesn't cut it you can always buy VMWare or Parallels.

  • Whats the best way to go about load balancing Exchange 2010 CAS

    My server guys want to LB the Exchange 2010 client access servers, this will be the 7th Context on my Ace 4710.
    see table for ports that are used
    Port
    Usage
    25
    smtp
    80
    http various
    110
    POP3 clients
    135
    RPC end point mapper
    143
    imap4 clients
    443
    SSL various
    993
    secure imap 4 clients
    995
    secure pop3 clients
    6001
    rpc related outlook anywhere
    6002
    rpc related outlook anywhere
    6003
    rpc related outlook anywhere
    60200
    rpc CAS
    60201
    exchange address book service
    whats the best way of going about this?
    do I just LB the IP addresses of the Servers and ignore the ports?
    do i have to do anything special for ports 993 and 995 secure imap and pop?
    I am sure there are more questions I shold be asking!

    OK
    so If I have a single serverfarm with all services do I filter on  the virtual
    address something like below?
    class-map match-any EXCH_vip
    match virtual-address 172.16.93.2 tcp eq 25
    match virtual-address 172.16.93.2 tcp eq 80
    match virtual-address 172.16.93.2 tcp eq 110
    match virtual-address 172.16.93.2 tcp eq 135
    match virtual-address 172.16.93.2 tcp eq 143
    match virtual-address 172.16.93.2 tcp eq 443
    match virtual-address 172.16.93.2 tcp eq 993
    match virtual-address 172.16.93.2 tcp eq 995
    match virtual-address 172.16.93.2 tcp eq 6001
    match virtual-address 172.16.93.2 tcp eq 6002
    match virtual-address 172.16.93.2 tcp eq 6003
    match virtual-address 172.16.93.2 tcp eq 60200
    match virtual-address 172.16.93.2 tcp eq 60201

  • Whats the best way to manage 100s of thumbnails?

    I'm trying to build a simple photo management app in java, like Picasa2. I want to be able to scroll through 100s of thumbnails. Whats the best way to manage them from a memory standpoint?
    a) can I load up 100s of thumbnails into a JScrollPane? If so, will it do anything special to manage memory for the thumbnails that are offscreen?
    b) should I just draw up a grid of JLabels and page through them like you would in html?
    Is there another approach? Is there any special way to manage the thumbnails that are offscreen (besides loading them all in memory ) and still get a fast response time?
    BTW, if anyone wants to join me in this project, I'm happy to opensource and share.

    Because for some of us, it takes a lot longer than 5 mins. Besides, I was on someone else's computer.
    Regardless, I've implemented JList for images, and it works really well. For those of you who are following in my footsteps, the answer is:
    JList renders ImageIcons by default.
    If you want to render a JLabel with an ImageIcon set to an image, you need to write a custom ListCellRenderer, but it turns out that is not too hard. But here is a follow-up problem:
    My app has JLabels that subscribe to an ImageLoader that loads images in the background. On init() the JLabel just has the ImageIcon set to a placeholder image:
              myJLabel.imgIcon = new ImageIcon();
              myJLabel.imgIcon.setImage( myPlaceholderImage );
    However, once the actual image is loaded, I call a refresh method to set the ImageIcon to a new image:
              myJLabel.imgIcon.setImage( myLoadedBufferedImage );
    My problem is getting the JList to render the updated JLabel. Right now, I keep a reference to the JList with myJLabel and call revalidate() on refresh, but that doesn't seem very clean.
    Is there an easy/natural place to get the JList to revalidate()?
    Can I easily know which JLabels are in the viewport of the JList scrollpane? That way I could revalidate only the visible JLabels or when scrolling.

  • HT3819 I have 2 Ipod touch's, one a 64gb and one an 8gb.  Whats the best way to use them both on the same itunes account?

    I have 2 Ipod touch's, one a 64gb and one an 8gb.  Whats the best way to use them both on the same itunes account?

    Click here for options.
    (64410)

  • One headphone does not work or works 50% of the time.  What is best way to resolve?

    one headphone does not work or works 50% of the time.  What is best way to resolve?

    First of all, I'd recomend resetting the iPod. Do this by pressing the 'Menu' and 'Center" buttons for 10 seconds or until the Apple logo appears.
    If this doesn't work, then it sounds like a hardware fault.
    To identify the issue, if you have one, try plugging the iPod into a speaker through the dock. If this works, then the issue is with the headphone jack. If not then the logic board is dead.  If the iPod is less than a year old, then it can be repaired by Apple for free. Just book an appointment for the Genius bar.
    If not then, you could see about sending it to an iPod Repair Company, such as my own. A replacement headphone jack would cost £30.00 in the UK, including next day delivery. Other companies you could try would beUKiPodRepairs, but we guarantee to beat any quote that you get.
    Hope that this helps,
    Mark Sweeney
    Dr Pod Founder

  • Whats the best way to transfer everything from my old macbook pro to a new mac mini, i have a external hard drive which i backup to regularly via time capsule

    whats the best way to transfer everything from my old macbook pro to a new mac mini, i have a external hard drive which i backup to regularly via time capsule

    Check out > OS X Lion: How to use Migration Assistant to transfer files from another Mac

Maybe you are looking for

  • How to move all data to another drive?

    I've just upgraded to Tiger and simultaneously installed two internal Seagate 325GB drives in mirror RAID configuration. I plan to keep the original 80GB drive for OSX and applications only, and move all documents, photos and music to RAID. But I'm n

  • Manual BRS - Masking of GL codes is not working,

    Hi Gurus, In Manual Bank Reconciliation statement, masking of GL codes assigned to Account Symbol is not working. In T-code FF67 (Bank reco Statement), system gives Error. Main  Bank codes are 111250 (ends with ZERO Clearing Bank Codes are 111251 (en

  • Image stabilization in QuickTime?

    I'm looking for a way to remove shake from video clips taken with my Fuji F30. I found a few plugins for iMovie, but I'm targeting posting them on the web, not authoring DVDs. Is there a QuickTime plugin to do this? I'm open to suggestions for other

  • My iphone4 shut off while charging and will not turn back on how do i fix this

    i was charging my iphone when it shut off by itself i have tried turning it on, also have tried plugging it into a different charger and the phone will still not turn on

  • Reports in Pivot table

    Hi, Whenver we crate a report in CRMOD, by defalut the columns are set from left to right. But as per the customer requirement, i have to design a report with the columns from top to bottom. Can anybody please suggest the solution. Thanks in advance