Bug #54694 Update documentation on load xml statement
Submitted: 22 Jun 2010 13:10 Modified: 23 Jun 2010 10:03
Reporter: Sus Andersson Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: XML functions Severity:S3 (Non-critical)
Version:5.5 OS:Any
Assigned to: CPU Architecture:Any

[22 Jun 2010 13:10] Sus Andersson
Description:
It would be nice with an update of the information on the following documentation page:

http://dev.mysql.com/doc/refman/5.5/en/load-xml.html

about the problems to load very large xml-files.

I tried to load a 600MB xml-file into a table, and it didn't work. See the  newbie forum:
http://forums.mysql.com/read.php?10,372342,372866#msg-372866

and the answer
http://forums.mysql.com/read.php?10,372342,372903#msg-372903

I understand you prefer a bug report to a comment on the documentation page.

It would be very nice if there would be some information on how large files are working. According to my tests the time of execution is seriously increased when the file size is > a couple of MB. 

Or if it isnĀ“t dependent on the file size, then with the parameter that makes sense. 

How to repeat:
See the  newbie forum:
http://forums.mysql.com/read.php?10,372342,372866#msg-372866
(though there are two typing errors

in the table over the time it takes to execute. 
10 000 items 600 000 rows 23375 kB takes 3000 seconds SHOULD BE 300 seconds

and the example code 

<item>
<id>123</id> 

SHOULD BE 
<item>
<article_id>123</article_id> 

Suggested fix:
Text added to the documentation, something like

"There is a problem to load large xml files (probably due to the XML processing using DOM and not SAX method)."

Maybe add
"Slowdown of execution occurs with file sizes  > 3-5 MB and is not recommended at all att file sizes > 20 MB."

(But that is only tested on my newbie set up system...)
[22 Jun 2010 18:14] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

This depends of how powerful machine do you have. Please read in the user manual how to tune MySQL server for better performance. Start from http://dev.mysql.com/doc/refman/5.1/en/mysqld-option-tables.html
[22 Jun 2010 18:15] Sveta Smirnova
Or http://dev.mysql.com/doc/refman/5.5/en/mysqld-option-tables.html for version 5.5
[23 Jun 2010 10:19] Sveta Smirnova
Thank you for the feedback.

There is no limitation for this statement and manual contains a lot of information about how to tune MySQL server. See chapter 7. Optimization, for example.