I am using MySql 5.1.14-beta with Java/ConnectorJ on the client.

Section '5.14. The MySQL Query Cache' states 'The query
cache is not used for server-side prepared statements' and I
have confirmed that the results of a stored procedure that
makes use of a passed in parameter are not in fact stored
into the query cache.

I did not realize this before putting a lot of work into my
stored procs. I did so partly because of the performance
benefits (I thought) of using stored procedures but I now
find that I am missing out on a major performance
enhancement -- results caching. The stored procs I am
concerned about only contain selects.

I know that stored procs are complicated for the cahcing
system to analyze but it seems that MySQL could know if a
stored proc contains only selects (or made use of my
annotation 'DETERMINISTIC
READS SQL DATA') that it would then be able to cache the
results. 

Anyone have suggestions to enable me to get caching on the
mysql server for the selects inside my stored procs? I could
move the selects out to my client code but I would prefer
not to -- one of my reasons for using sp's was so that I
could limit the permissions of my client user to execute
permissions only for designated sprocs and no select
permissions.

Thanks,

Peter Andrews

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to