soryu Jeong wrote:
>
> and at the moment, I have another question about template query.
>
> what is better performance query? template query or normal query ?
>
> or is there no performance difference ?
Please keep replies on the list.
It may be possible to measure a processing difference on the local CPU
between the various query types, but all of them will execute on the
MySQL server in the same amount of time. Network and disk I/O overhead
between your program and the DB server should swamp any such differences.
The only way to speed up a MySQL query by changing the query type would
be to use prepared statements. This reduces the SQL parsing time in the
DB server, so it helps when you repeat the same form of query
frequently. MySQL++ currently has no special support for prepared
statements.
Prepared statements are superficially similar to template queries,
though they work very differently under the hood. I think it may be
possible to abstract away the difference between these two mechanisms,
so you build and use a prepared statement the same way as you currently
do with template queries. For now that's just a Wishlist item.