Re: Servere performance issue with compiled (pre-prepared) queries - they're 50% slower than parsed queries

Sinisa Milivojevic <[email protected]>
Newsgroups gmane.comp.db.mysql.bugs
Message-ID <[email protected]>
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.
> 
> Kevin Cowley
> R&D
> 
> Tel: 0118 902 9099 (direct line)
> Email: [email protected]
> Web: http://www.alchemetrics.co.uk
> 
> 

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,

-- 
For technical support contracts, go to https://order.mysql.com/?ref=msmi
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Sinisa Milivojevic <[email protected]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB
/_/  /_/\_, /___/\___\_\___/   Full time Developer and Support Coordinator
       <___/   www.mysql.com   Larnaca, Cyprus



-- 
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.