Afficher un message
Vieux 19/08/2007, 14h50   #1
Edoardo Serra
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Query cache problem with stored procedures

Hi all,
I'm benchmarking performance improvement with MySQL Query Cache turned
on but I'm facing some problem with queries inside stored procedures
when they contains variable parameters

I just created this stored procedure to identify the problem

CREATE PROCEDURE `proc_test_qcache`(IN mailbox_number VARCHAR(64)) READS
SQL DATA DETERMINISTIC
BEGIN
SELECT password FROM users WHERE mailbox = mailbox_number;
END

I see, looking at Qcache status, that calls to that stored procedure
are not cached.

Is it a known limitation ?

I think that MySQL should evaluate caching after variable substitution
but I'm not aware of MySQL internals to judge if this is the correct
behaviour.

P.S: I noticed that MySQL caches without problems queries contained in
stored procedures which does not contains variables.

Tnx in advance for

Regards

Edoardo Serra
WeBRainstorm S.r.l.
  Réponse avec citation
 
Page generated in 0,05018 seconds with 9 queries