Re: Query caching issue
- From: Lew <lew@xxxxxxxxxxxxx>
- Date: Tue, 28 Aug 2007 20:01:30 -0400
Donkey Hot wrote:
flarosa <frank@xxxxxxxxxxxxxxx> wrote in
news:1188336563.702587.309240@xxxxxxxxxxxxxxxxxxxxxxxxxxx:
Thanks for the tip. The hit rate on my query cache is zero. I think I
see why. This statement appears at the very end of the query cache
discussion in the MySQL manual:
"No query that uses bind variables can be reused."
All my queries use bind variables -- I've been told for years that you
should always do prepared queries with bind variables instead of
sending your query as a literal string.
This sucks - what can I do?
Change MySQL to Oracle. It can reuse queries with bind variables. At least in C/OCI level.
But this switch maybe is not possible, then you have to cope with MySQL's limitations.
PostgreSQL will use prepared statements:
<http://www.postgresql.org/docs/8.2/interactive/sql-prepare.html>
<http://jdbc.postgresql.org/documentation/82/server-prepare.html>
--
Lew
.
- Prev by Date: OJB and doclets
- Next by Date: TopLink: sorting entities by boolean value
- Previous by thread: OJB and doclets
- Next by thread: TopLink: sorting entities by boolean value
- Index(es):
Relevant Pages
|
|