Mister Jack wrote:

>Hi,
>
>I was wondering if there is any query cache code/lib somewhere to
>cache certains queries ?
>I'm always doing the same queries, (and the result never change, so I
>could spare the round-trip to the server), but caching each tine the
>data for it is a bit of work.
>Thanks, for your suggestions
>  
>
MySQL has a query cache. Check the documentation. Add the lines:

query_cache_type        = 1
query_cache_size        = 16M

to the [safe_mysqld] of your /etc/mysql/my.cnf file and restart mysql.
It will cache all queries on a *connection*. ie to receive a cached
result, you have to issue the query from the same connection as when the
query was originally run.

-- 
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au

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

Reply via email to