2 messages in com.mysql.lists.bugsRe: Servere performance issue with co...
FromSent OnAttachments
Kevin Cowley05 May 2004 03:00 
Sinisa Milivojevic05 May 2004 05:28 
Subject:Re: Servere performance issue with compiled (pre-prepared) queries - they're 50% slower than parsed queries
From:Sinisa Milivojevic (sin@mysql.com)
Date:05/05/2004 05:28:30 AM
List:com.mysql.lists.bugs

Kevin Cowley writes:

OK

I've just been completing some benchmarking comparing compiled (pre-prepared) queries (new in 4.1.1 and above) with standard parsed queries.

For both INSERT queries "insert into table( col1, col2,col3) values(?,?,?)" and SELECT queries "select col1, col2,col3 where col1 between ? and ?" the compile (pre-prepared) query is 50% slower. These time are just for the 'execute' and the queries are only prepared once.

[skip]

Anyone care to shed some light on this?

Also why with select queries do you have to allocate and free the results area every time you run the query? Surely it would be more logical to re-use the existing area - maybe rather than freeing it you should just be able to reset it.

Hi!

We have done some measurements with 4.1.2 and prepared statements were a bit faster. 4.1.2 should be out within a week or two.

We would be gratefull if you could repeat your measurements with 4.1.2.

Regarding result set, that is not a bad idea. This would however require a new set of functions. Probably most current application would continue to use current API.

Sincerely,