Loading...
 

UserPagenitroburn

Hi, My name is nitroburn. My Tikiwiki homepage is @ Corrupt Logic
--------
MySQL Database speedup for TikiWiki..

After playing around I have replaced all the database "select" commands in the libraries to "select SQL_CACHE" this (if your mysql is setup to) will use caching for all database requests. So far, this has lead to a small jump in speed.

I haven't found it to break anything yet...


I deleted everything and redownloaded the CVS 1.9 ... NOTE! Some things really are broken in the 1.9cvs at the moment.

I did all the replacing this time with ... replace :-)

/usr/local/bin/replace -fsrv "'SELECT" "'SELECT SQL_CACHE"
/usr/local/bin/replace -fsrv "\"SELECT" "\"SELECT SQL_CACHE"

ran both those and it replaced everything with no breakage! :-)
load times also went from ~2.0-4 seconds to .50-.8 seconds for the article page (my homepage) with the average being .57
Unless something in tikiwiki has been sped up since sept 8th's 1.9cvs


Odd.. repaced libraries with CVS lib's and seems to be only a few ms slower now. Damn weird results.
what can I say.. It is experimentation.. It seems .55seconds is as fast as i can get it to go (with javacounter)


As per the comment by damian.. a single replace can be done in tikidblib.php

function convert_query(&$query) {
global $ADODB_LASTDB;
// — MYSQL CACHE
$query = str_replace("SELECT", "SELECT SQL_CACHE", $query);
$query = str_replace("Select", "SELECT SQL_CACHE", $query);
$query = str_replace("select", "SELECT SQL_CACHE", $query);
// — END MYSQL CACHE

-- question.. is str_replace case sensitive?


Page last modified on Wednesday 13 October 2004 08:18:24 GMT-0000

Upcoming Events

No records to display

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.