Re: Speeding up database access

From: Date: Fri, 05 Oct 2001 16:59:53 +0000
Subject: Re: Speeding up database access
References: 1  Groups: php.db php.db 
Request: Send a blank email to php-db+get-13045@lists.php.net to get a copy of this message
Hi Check your indices are tuned. Personally, I feel that storing languages srings in arrays, particularly if you are using a cache like Zend/APC gives better performance. Bye, John "Rob)" <rob@insanegadgets.spambait.com> wrote in message news:3bbd7ee3.5242257@news.php.net... > I am just starting out on a project that has to be multi-lingual. i.e. > every word/sentence I output has to be translated. > > The user logs in, and I read the language they use, by looking at the > user record. > > I then need to get the language translations from a database. > I just "select label, text from language where lang = "English"; > > Fields: [label],[text],[language] > Example: "M1002","Please enter the delivery address","English" > > At the moment I download them into a associative array, so I can > access the text like this. > > txt['M1002'] > > where 'M1002' is a label. I have made txt a session variable. > > The trouble is, there are so many text translations (6000+), that it > takes about 10 seconds to download them all into this array. > > I don't want to access the database every time I need to print out > some text. > > Question:- > > How can I improve the startup time?? In case it was not obvious from > the above, I am a newbie at PHP!! >

« previous php.db (#13045) next »