in reply to Re^3: Memory Efficient XML Parser
in thread Memory Efficient XML Parser

You're actually exactly right however the database server is not have any issues executing this large query. In fact it is one of the fastest queries that runs on my server with the optimization that is done. I found that it is less efficient to loop through hundreds of queries one by one, opposed to running one large query filled with joins. I'm now parsing the XML with a simple regexp and it uses less than half the memory when using the XML:Records module. Thank you for everyones help, but it appears going back to the basics have solved my memory issues for the time being.

Replies are listed 'Best First'.
Re^5: Memory Efficient XML Parser
by Jenda (Abbot) on Dec 18, 2007 at 18:26 UTC

    Could you show us the code? I seriously doubt shoving a huge SQL string that has to be all parsed and compiled by the server is quicker than preparing a statement and then sending the server just the values for each row. Especially if you only commit reasonably sized batches.

    Parsing XML with regexps is something that might look like it works now, but unless you have strict control over whatever produces the XML you may run into serious problems.

    Show us the code!