PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > mysql.general > Query cache problem with stored procedures
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Query cache problem with stored procedures

Réponse
 
LinkBack Outils de la discussion
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
Vieux 19/08/2007, 15h12   #2
Baron Schwartz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Query cache problem with stored procedures

Hi,

Your questions are answered in the manual:
http://dev.mysql.com/doc/refman/5.0/...cache-how.html

It is a known limitation.

Edoardo Serra wrote:
> 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
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 10h12.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08409 seconds with 10 queries