Re: Taking PHP + MySQL to the max

From: Date: Sun, 16 Jul 2000 00:32:12 +0000
Subject: Re: Taking PHP + MySQL to the max
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-6789@lists.php.net to get a copy of this message
> I am working on a forum using PHP + MySQL which looks strikingly > similar to UBB based boards, but with all the tweaks, hacks, etc. :) > The problem I encountered is that when I compared just by view thread > on the PHP based forum and the UBB based board (both on the same > server), the PHP script was a tad slower to show the thread. I am > using about 3-5 queries for perhaps most of the functions performed. > Is that slowing the board down? I have a few tables to keep it > organized, but yet, I think that querying 3-4 tables to perform one > function slows down the script incredibly. So my question is, what > ways could I actually speed up the script? I've talked to one PHP guy > and he told me instead of putting the data into seperate columns in > the table, put all the info into one column, seperating the data with > delimeters which PHP will parse and retrieve the info. How would that > help if I am having 8 columns, and sometimes I just want to pull one > column of information? Thanks for any help with this. . . > Weeelll, I suspect that your problem does lie with the number of queries is slowing things down. Generally it is much better if you can execute complicated lookups / insertions using SQL as mySQL can execute these faster than executing one query, parsing the results and executing another query. Is your database fully relational? Look at a good SQL reference for stuff on inner joins e.t.c. Query --> MySQL --> Parse --> Query e.t.c. is much slower than Complicated Query --> MySQL --> result. Try some structured SQL... Rgrds, Phil Messenger

« previous php.general (#6789) next »