[mythtv] efficiency of prepared statements in datadirect.cpp
brad-mythtv at fritzfam.com
Tue May 25 01:21:27 EDT 2004
Using a CVS build from 2004-05-12, I migrated from XMLTV to
DataDirect this evening using the (very helpful) instructions
in the HOWTO. Overall everything went well, but I was surprised
by the long execution time of mythfilldatabase and the high
load average it caused on the backend server.
I updated my cvs tree and quickly scanned datadirect.cpp. It's
good to see the use of prepared statements and bound parameters,
but I was surprised to see the QSqlQuery.prepare() calls in
DDStructureParser::endElement(). Would it be more efficient to
prepare the INSERT statements in DDStructureParser::startDocument()
or somewhere else that gets called once per download or once per
execution of mythfilldatabase?
Apologies to the list if I am asking a naive question or one that
has been covered before. I am familiar with SAX parsing in Java,
but have almost zero QT or C++ experience and am still pretty new
to the mythtv code. I scanned the datadirect grabber patch thread
in the archives but didn't seen any discussion of this topic.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20040525/28f73588/attachment.pgp
More information about the mythtv-dev