'show' is a query just like any select. They both return the same type
of result set. As a result they can be issued from the C API or any
other.
 
http://dev.mysql.com/doc/mysql/en/SHOW_VARIABLES.html


On Tue, 7 Dec 2004 17:12:28 +0000, Alexis Cheshire <[EMAIL PROTECTED]> wrote:
> 
> Do you know if this is available thru the C API .. Could a User Defined 
> Function be written to return this?
> 
> Any more ideas would be great..
> 
> Thanks
> 
> Skex
> 
> 
> -----Original Message-----
> From: Eric Bergen [mailto:[EMAIL PROTECTED]
> Sent: 07 December 2004 16:50
> To: Alexis Cheshire
> Cc: [EMAIL PROTECTED]
> Subject: Re: Query Cache
> 
> Skex,
> 
> show status like 'Qcache%';
> Will give you status of the query cache. There isn't a way to tell if a query 
> result came from the cache or not other than the time it took to return or if 
> it's the only query ran between checks of the show status.  Neither of these 
> methods is very reliable. Cache hits from Qcache_hits and Com_select from 
> show status like 'Com_select'; should be enough to tune the cache. Alternatly 
> the mytop utility will show you cache hit miss ratios on the fly.
> 
> -Eric
> 
> On Tue, 7 Dec 2004 16:28:38 +0000, Alexis Cheshire <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > Is there a way to access if a Query is returning its record from 
> > QUERY_CACHE or not?
> >
> > E.g.
> >
> > $sql="SELECT * FROM TABLE";
> > $result=db_query($sql);
> > print $result;
> >
> > //If query NoT returned from mysql_query_cache() //Would Output
> > something like:
> > Array["status"]["cached"]=0;
> > Array["status"]["count"]=1;
> > Array["data"][0][field1]=1;
> > Array["data"][0][field2]=2;
> > Etc...
> >
> > //ELSE
> > //Would Output something like:
> > Array["status"]["cached"]=1;
> > Array["status"]["count"]=1;
> > Array["data"][0][field1]=1;
> > Array["data"][0][field2]=2;
> > Etc...
> >
> > Any ideas would be greatly appreciated...
> >
> > Skex
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> >
> >
> 
> --
> Eric Bergen
> [EMAIL PROTECTED]
> http://www.bleated.com
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 


-- 
Eric Bergen
[EMAIL PROTECTED]
http://www.bleated.com

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

Reply via email to