Which solution for better perfomance?

I'm writing java application based on XML. This application have to store very large XML file into DB (XML file is about 1000MB large). My solution is to divide it into smaller (100MB) parts (because of memory resources) and store it in DB. I have one XMLType table based on object-relational storage (so at the end there will be 10 rows each of 100MB size).
XML file looks like:
<students>
<student id="1">
...// 5 nested elements or collections of elements
</student>
<student id="2">
</student>
<student id="3">
</student>
</students>
</students>
Now I need to get java object Student which correponds to <student>element. My solution is to select whole <student> element and use JAXB to convert it to Java object. While solving a problem with selecting <student> element (just in case you know a solution for my another problem: How to select specific element from a XML document using JDBC? another question raised in my mind.
Which solution has better performance when I don't need to select relational data but I'm interested in xml fragment?
1) Use object-relational storage
2) Use CLOB storage
As I figured out object-relational storage is better for selecting data like student name. But is it also better when I need whole xml fragment?
Isn't my solution completely wrong? I'm quite a newbie in XML DB so it's possible that I missed better solution.
Thanks for any advice

I don't know which version you have regarding 11g, but probably in this case I would go for a table with a XMLType Binary XML column. To make xpath and other statements perform use Structured or Unstructured XMLIndexes to support your queries. The following has worked for far smaller XML documents but the millions we used were good for a total of >> 1 TB total storage size...
CREATE TABLE XMLTEST_DATA
(    "ID" NUMBER(15,0),
      "DOC" "SYS"."XMLTYPE"
) SEGMENT CREATION IMMEDIATE
NOCOMPRESS NOLOGGING
TABLESPACE "XML_DATA"
XMLTYPE COLUMN "DOC" STORE AS SECUREFILE BINARY XML 
(TABLESPACE "XML_DATA"
  NOCOMPRESS  KEEP_DUPLICATES)
-- XMLSCHEMA "http://www.XMLTEST.com/Schema1.0.xsd"
--  ELEMENT "RECORD" 
DISALLOW NONSCHEMA
PARTITION BY RANGE(id)
(PARTITION XMLTEST_DATA_PART_01 VALUES LESS THAN  (100000000) TABLESPACE "XML_DATA" NOCOMPRESS
,PARTITION XMLTEST_DATA_PART_02 VALUES LESS THAN  (200000000) TABLESPACE "XML_DATA" NOCOMPRESS
,PARTITION XMLTEST_DATA_PART_03 VALUES LESS THAN  (300000000) TABLESPACE "XML_DATA" NOCOMPRESS
,PARTITION XMLTEST_DATA_PART_04 VALUES LESS THAN  (400000000) TABLESPACE "XML_DATA" NOCOMPRESS
,PARTITION XMLTEST_DATA_PART_05 VALUES LESS THAN  (500000000) TABLESPACE "XML_DATA" NOCOMPRESS
,PARTITION XMLTEST_DATA_PART_06 VALUES LESS THAN  (600000000) TABLESPACE "XML_DATA" NOCOMPRESS
,PARTITION XMLTEST_DATA_PART_07 VALUES LESS THAN  (700000000) TABLESPACE "XML_DATA" NOCOMPRESS
,PARTITION XMLTEST_DATA_PART_08 VALUES LESS THAN  (800000000) TABLESPACE "XML_DATA" NOCOMPRESS
,PARTITION XMLTEST_DATA_PART_09 VALUES LESS THAN  (900000000) TABLESPACE "XML_DATA" NOCOMPRESS
,PARTITION XMLTEST_DATA_PART_MAX VALUES LESS THAN  (MAXVALUE) TABLESPACE "XML_DATA" NOCOMPRESS
CREATE INDEX test_xmlindex on XMLTEST_data (doc) indextype is xdb.xmlindex
LOCAL
parameters ('GROUP PARENTINFO_GROUP
             XMLTable test_cnt_tab_ParentInfo
            ''/RECORD/ParentInfo''
            COLUMNS
             GroupingID01 VARCHAR2(4000) PATH ''Parent/GroupingID'',
             GroupingID02 VARCHAR2(4000) PATH ''Parent/Parent/GroupingID''
          ');

Similar Messages

  • Which solution is better for schedules task? Console application or windows service?

    I have a "MULTI-LEVEL" XML file that I will be getting on daily basis and I want to accomplish following tasks:
    1) I have to read and parse the "MULTI-LEVEL" XML data
    2) Then I have to set or create some kind of .net service (c#) that read the xml and parse the data once a day (daily)?
    3) Now I have SOAP service from other software where I want to feed this XML data to. The schedules service will compare the XML data with software data and update (or add) based on the comparision.
    For this task, I come to conclusion that there are 2 best ways to do this:
    1) Create a console application and use windows task scheduler to run it everyday
    2) Create a windows service that runs in the background
    Which is a better way (or reliable)  solution to do this task? Please advise

    There are several things to keep in mind when writing an app that is designed to run without a user logged in. One of the most common mistakes is requiring some sort of user input.  Since the task will run without user intervention you don't want
    any sort of calls to Console.ReadLine, MessageBox.Show, etc.  They will cause the task to freeze and eventually need to be terminated.  You also don't want to rely on any sort of desktop apps running since a user may or may not be logged on at the
    time.
    Also be aware that a task can be scheduled to run under any user context.  As such you either need to ensure it runs under an account with sufficient privileges or that your app needs no special privileges.  You mentioned you tried to run it from
    bin\debug but you most likely have your project under your Documents directory.  Only you would have permissions to that folder and therefore will run into issues if the task is run under a different context.  You also mentioned you put it in the
    C:\ but users don't have write privileges to that folder and therefore if you tried to write a file out it would fail. If you need to read/write files then you should pick a common location that all users have access to or at least the one that will run the
    scheduled task. Be aware that, by default, Task Scheduler will not run a task elevated. You need to check the option to run elevated when you configure the user to run the task under.
    One of the key things to ensure you do with a task is verify it is working properly as a normal app.  You should also ensure that you have good logging so that if it does fail you can trace down the failure more easily.  One common thing that people
    tend to do in console apps is put a try-catch around the main function and display a message if an unhandled exception occurs. This is going to cause problems in a task.  Simply log the exception and rethrow it so Task Scheduler will flag the run as a
    failure.
    If you still cannot figure out why your task is failing then please add some logging and then tell us what code is being run at the time and what the failure is.

  • Which solution is better

    Hi all ,
    I have a table callled preference (usr_id, pref_cd,prod_cd,prod_Fam_cd,updated_date)
    user who logs in to the application will set the preference for a product ..
    Now Java team wants me to create a stored procedure that accepts array of preference objects(each preference object contains all the fields of preference table) and I have to update/insert the preference table .
    I have created the procedure.
    But my question is Is this a good way ? cant java code directly access the table tot do this ? why to make it complex to create a stored procedure and create table types and object types which is additional maintenance.
    Plz suggest which is the better approach?

    raj_fresher wrote:
    now I write a function to perform this and this function will have to return some success code(say 0) to the java program if the inserts and updates are successful else i will have to return some failure code (say 1)1) I assume you really mean that you are creating a stored procedure to do the DML, right? Functions should not do DML.
    2) Why do you need to return a status code? It is generally far preferrable to throw an exception if a procedure fails than to force every caller of the procedure to add code to check the status code after every call.
    Now what condition i have to test for a success or failure when writing a function ?
    I used Merge command to insert a record if it is not present or update the record if it is present.
    Now I will always pass success only right .... what failure condition should i be checking on in the procedure?The condition you have to test for depends on your requirements. What constitutes success? If doing a merge is appropriate, presumably the Java code doesn't care whether rows were inserted or updated. So success may be that the MERGE statement ran without throwing an exception.
    secondly , if it is an oracle error how do i pass on the exception to the java code which is calling this proc?If your procedure throws an exception, that exception will automatically propagate to the Java code. The Java code will get a SQLException with the stack trace and error information.
    Justin

  • Adobe forms vs website, which solution is better

    Hi experts,
    Please tell me the pro and con of the following 2 solutions:
    Adobe forms
    asp.net call sap web service
    Thanks

    The information below from SAP Help might help you make the decision.
    [http://help.sap.com/saphelp_nw70/helpdata/en/2c/241a427ff6db2ce10000000a1550b0/frameset.htm]
    "We recommend you use interactive forms only after carefully checking the requirements of your application. Interactive forms should only be used if a PDF-based form really does have advantages over a normal Web Dynpro view.  This can include for instance scenarios in which paper-based processes are to be replaced or complimented by an online scenario with exactly the same form layout. Other cases can be applications where, in addition to the online scenario the same form is needed in static form for printing, archiving, sending by e-mail, or for other purposes."

  • Xen/KVM/other - which solution for Linux virtualization

    Hello,
    we are intensively using Solaris 10 virtualization called Solaris zones. It is so secure (in terms of separation), easy to use and has so little overhead that our DBAs doesn't want to install our RDBMS-es out of zones. But we are going to deploy some RedHat-based servers with Oracle. Could you write what kind of virtualization would you recommend in such (Linux) environment ? Would problems should we prepare for ? How about maturity of the solutions ? Would you deploy the most important Oracle databases (in your company) using Linux-based virtualization ?
    Regards

    user583010 wrote:
    But we are going to deploy some RedHat-based servers with Oracle. Could you write what kind of virtualization would you recommend in such (Linux) environment ?The only certified virtualization stack for Oracle Database is Oracle VM with Oracle Enterprise Linux, so I'd recommend that. :)

  • Data aggregation: which solution for this case ?

    Hi all,
    I have a fact table where measures are referred to a single year. Outlining, something like this:
    year quantity
    1998 30
    1998 20
    2000 70
    2001 20
    2001 20
    I would to build a cube and then to analyze "tot.quantity for each year" but don't want aggregate "tot.quantity for all year".
    I haven't in my source database the "Year dimension" to mapping on year field.
    Do you have some suggestions on how to implement this and how to build cube using AWM tools (Year dimension and relative levels/hierarchies)?
    thanks.

    I am not sure I fully understand what you are trying to do, but from the example below you could create a single dimension called Year with one level of Year, add a hierarchy containing only one level, create a cube dimensioned by year and then map the table you have described below to the cube. As there is only one level in the dimension, no aggregation would performed by AWM.
    For the mapping you will need to create a view over your source table as follows:
    CREATE VIEW FACT_VIEW AS SELECT, YEAR, SUM(QUANTITY) FROM TABLE GROUP BY YEAR
    because AWM does not support an additive data loading model (surprisingly the API actually does but this is not exposed in AWM). You can only provide a single row for each dimension member. If you present multiple rows then the last row wins which in your example would result in the following data being loaded into AWM:
    1998 20
    2000 70
    2001 20
    If you create the view as shown above you should get the following data loaded:
    1998 50
    2000 70
    2001 40
    which is what I think you want?
    Hope this helps
    Keith Laker
    Oracle EMEA Consulting
    OLAP Blog: http://oracleOLAP.blogspot.com/
    OLAP Wiki: http://wiki.oracle.com/page/Oracle+OLAP+Option
    DM Blog: http://oracledmt.blogspot.com/
    OWB Blog : http://blogs.oracle.com/warehousebuilder/
    OWB Wiki : http://wiki.oracle.com/page/Oracle+Warehouse+Builder
    DW on OTN : http://www.oracle.com/technology/products/bi/db/11g/index.html

  • Which solution for small business

    Hello,
    Our office has 30 users (single location).  Right now we use an expensive PBX system provided by a third-party.  We have some Cisco expertise in our company, so we would be comfortable replacing it with a Cisco solution.  
    I'm familiar with CUCM v8/9 at customer locations, but that's obviously overkill for us.  I'm not too familar with the smaller products.  In doing some research it looks like we'd be looking at one of three options:
    SBCS - UC500
    Cisco Business Edition 6000/7000
    CME running on a router
    Are there any documents that might compare these solutions? I've read the individual data sheets, but still confused about the real-world differences.  Specifically features that may push us to one solution or another.  We just need basic features (voicemail, moh, single number reach).  Our phones are SPA models today, but we would like support for the traditional IP 79xx phones as well.  
    Thanks
    Bill

    Thanks.  I will definitely contact a partner as we move along in the process, but I just wanted to do a little research on my own first. 
    Thanks for the explanation -- that helps a lot.  So from a price point of view it sounds like BE6K would be a bit more expensive (since it's CUCM/UCXN vs express versions).  And you wouldn't look at the SBCS?  Is that truly a Cisco product or is it some re-branded Linksys type acquisition?
    Thanks!

  • Third party PO Process -Looking for better solutions

    what would be best solution for the below business process
    We have one corporate headquarters(A) which has 3 plants(Plants X,Y and Z).
    Corp.HQ (A) deals negotiation with one supplier directly and buys the materials and responsible for the payment.
    but the goods should be directly delivered to the plants ...not to Corp.HQ
    At the same time the receiving plants,intern have to pay to the corp.HQ for the same.
    I can think of 2 step process for this process
    Step 1 : Creating Third party PO between Corp.HQ and Supplier
    Step 2 : Creating a Stock transport order /Intercomp order between Corp.HQ and receiving plants
    But is there any solution with Single step or any other better solution for this process?
    Thanks in advance
    Thanks and Regards,
    Kesavan

    The first step is not ok in my opinion, since the goods will be posted for consumption, so there will be no stock to be transferred via the intercompany STO (2nd step in your process).
    In SAP it is possible to use central purchasing organisation. What if the HQ would be represented in the purchasing process as a central purch. org. and it would issue a "normal" PO to the vendor (one PO: vendor --> manufacturing plant)?
    In this case you should solve the payment process only (HQ --> vendor; plant --> HQ) - if the HQ would be set as invoicing party in the PO, the payment between HQ and plant would be solved. In the vendor's SO the HQ should be set as payer/invoicing address, the HQ would receive the invoice and eneter it w/o any PO (but enter the real PO number as reference).
    You would need some development to integrate the two incoming invoices not to have discrepancy.
    Just an idea...

  • Old table style that i'm surprised Indesign doesnt have a better solution for

    Hey guys, I had a question about indesign tables. In one publication I am working in, the client has expressed a desire for table to be done the way they always did them which is the following.
    When the table is first being introduced to the reader (that is when it starts) it has a .75 stroke above. however if the header row occurs on any succeding pages, then that stroke should be .25 like any other strokes that may occur on the table (like at the bottom, or the line under the headers.
    This is so simple but right now it has me stumped. Is there any way to do this in an easier fashion than having to convert the header to a body row recreate or fake the header row by putting it into the regular flow of rows? Thanks all!

    Yeah, that's what I'm saying: you can't just apply a stroke to the top of a frame, and if your objects aren't anchored then you risk the possibility of a number of lines randomly floating around. The whole point of anchored objects is to anchor them to a particular point in the text, so when they text reflows they follow along. So: use the pen tool to draw your line, copy it to your clipboard, create an anchored object, manipulate it until it's sitting exactly where you want it, and paste your new rule in.
    Positioning anchored objects precisely works well once you understand the interface, but the first time out I found it really confusing, hence my link to the help file entry on anchored objects.
    There may well be a better solution for your issue, but this duct tape is what came immediately to mind.

  • I am going to buy a macbook pro for grade 12, and I need to know wheather I should get a macbook pro or a macbook pro retina. If someone could tell me (in a very simple way) which one is,better for me and why, I would be ever so apprreciative.

    I am going to buy a macbook pro for grade 12, and I need to know wheather I should get a macbook pro or a macbook pro retina. If someone could tell me (in a very simple way) which one is,better for me and why, I would be ever so apprreciative.

    Why do you need a expensive MacBook Pro?
    Your attending high school and unless everyone else is rich also your likely going to be a target by the more poorer students for theft or damage to the machine.
    You could keep it home, but if you need it for class then your exposed again.
    Also at that age your not very careful yet, a MacBook Pro is a expensive and easily damaged machine.
    Unless your made of money and so are others at your school, I would recommned a low profile, just does the job cheap Windows PC.
    If it dies, gets lost, stolen or damaged because of your inexperince handling senstivie electronics then it's no big deal.
    You can buy a Mac later on when your sure you have a need for it, currently there isn't much advantage of owning a Mac compared to a PC, they do just about the same things now, one just looks prettier than the other.
    Since 95% of the world uses Windows PC's your going to have to install Windows on the Mac in order to keep your skills up there or be unemployed, so it's a extra headache and expense.
    good luck

  • I bought my iphone 5 in Houston Texas May 15 2013 IMEI Nr. 013428009645399.The problem is that in the Greece the country which I live the 4G is not working.If you have any solution for this problem pls. let me know.My email is philcoueth@yahoo.gr Thank yo

    I bought my iphone 5 in Houston on May 15 2013.
    IMEI 013428009645399.The problem I have is that in the country
    which I live GREECE the 4G is
    not working.Please if you have any solution for this
    problem let me know.My email is [email protected]
    Thanking you in advance
    Philip Couridis

    iPhones purchased in the US are NOT guaranteed to work with 4G bands outside of North America.
    For what crazy reason did you purchase an iPhone in the US if you live in Greece?  If your phone needs servicing, it will have to be brought back to the US.  You cannot get that phone serviced in Greece.

  • TS1702 I use iphone5, I see an app update on the app store. but when App store and click on the update tab, it doesn't show me which application to update.. just give me a blank page.!!!! what is the solution for this.!!!!

    I use iphone5, I see an app update on the app store. but when App store and click on the update tab, it doesn't show me which application to update.. just gives me a blank page.!!!! I wouldn't able to know what app has to be updated, untill and unless i get check for each every app on the app store installed on my iphone... what is the solution for this.!!!! can any1 one help me out.!!!!

    Cc2528 wrote:
    The iTunes Store on my iPad is set up with all my music already. And at the very bottom it shows my apple Id username. The only place it shows the previous owners id is in the App Store...
    You can probably change the ID in the "iTunes and App stores" settings on the iPad....click on the wrong account ID , select sign out, then log in with your own ID, I have not done this but I think it works.....
    but I would be more inclined to to the factory reset and start afresh.

  • I am looking for macbookpro mid 2010 HDD exact specs so that i can upgrade it to 1TB. PLEASE HELP ME  about OEM apple brand or which one is better.Thanks

    I am looking for macbookpro mid 2010 HDD exact specs so that i can upgrade it to 1TB. PLEASE HELP ME  about OEM apple brand or which one is better?.Thanks

    clintonfrombirmingham Your information is not correct.
    http://kb.sandisk.com/app/answers/detail/a_id/8142/~/difference-between-sata-i,- sata-ii-and-sata-iii
    I have a sata II samsung 5400 rpm and i am only able to transfer at 85 read right speed.
    On my main drive sata III ocz agility 3 ssd i get 120 mb read and 180 write.
    Neither of these come close to the 300 mb promised. So it wont matter if he got sata II or III
    The speed came from Blackmagic Disk Speed Test

  • I would like to buy am Ipad for my nephew. Which one is better to play games, ipad or ipad mini

    I would like to buy an ipad for my nephew. Which one is better, ipad or ipad mini? He wants to play games, and put lots of app.

    Probably the full iPad, because it has a better graphics card. The larger screen helps too.

  • Which IDE is better Jdev or Eclipse for BPEL

    Hi All,
    Which Tool is better to use for BPEL - Eclipse or Jdeveloper.
    Thanking You,
    Rakesh.

    BalaTTPL wrote:
    for j2ee netbeans is best. if u use ecplise(wtp) it create only web.xml.Maybe you did something wrong :)
    compare with ecplise netbeans is best it have
    1) xml gui tool, verification and validation
    2) no need to create web.xml
    3) debug also easy and user friendly.Eclipse also offers this.
    After all, just install them both and try them both out. If you want my opinion: Eclipse Europa for Java EE or IntelliJ IDEA.

Maybe you are looking for

  • Apple Mail and Exchange Out of Office Not Working

    Has anyone had issues with Yosemite Mail and setting Out of Office for Exchange 2010? I can set Mail to send Out of Office replies but cannot change the scheduled dates from 2/12/1982, 10:00 AM. Even when I do set it, it does not seem to send the OOO

  • QuickTime 7.1.0 for Windows

    For my work, we need to download QuickTime 7.1.0 for our video editing program to work properly. I have not been able to find that version for download on the Apple site. Does anyone know if www.oldversion.com/program.php?n=quicktime is a reliable si

  • Why are some of my pdf documents not converting to a word document?

    I have tried to convert a pdf document to word and it is not allowing me to enter the document to make changes, its as if it is still a pdf or picture

  • Import from Iphoto

    I just purchased and installed Aperture 3. I imported all the photos is Iphoto which were about 1,636 images. The Apeture software is taking a very long time building the Faces Thumbnails. It will process 5 to 6 images then stops. It will take an ent

  • How to define a limit in correspondance two activities in SAP PS..?

    Dear experts, i m new in SAP PS, acctually i want to know that if in any production project there are two activities , one for working biling and other for non working billing . and if i want to put a limit ( 24 hour) in both activity, means if user