[mythtv] efficiency of prepared statements in datadirect.cpp

Brad Fritz brad-mythtv at fritzfam.com
Tue May 25 02:15:31 EDT 2004


Isaac and others,

On Tue, May 25, 2004 at 01:44:48AM -0400, Isaac Richards wrote:

> Qt's emulating the prepared statements since mysql doesn't support them (or 
> didn't until very recently), so it's just doing string replacements.  Moving 
> the prepare elsewhere's only going to save an extremely small amount of time 
> (ie, a string init).
 
Thank you for the explanation.  I didn't realize MySQL did not support
prepared statements until version 4.1.  My performance problems must be
elsewhere.  (A strace of the mythfilldatabase process seemed to indicate
slow inserts, but the server is moderately loaded and I may not have
mysql tuned properly.)

> A quick perusal of the Qt docs on QSqlQuery would have shown this.

You're right.  For anyone who cares, the links are:

  http://doc.trolltech.com/3.2/qsqlquery.html#details
  http://dev.mysql.com/doc/mysql/en/News-4.1.x.html

Thank you for the pointers.

--Brad



More information about the mythtv-dev mailing list