Oprano Front Page


Go Back   Oprano Adult Industry Forums > The Business Of Porn - Closed For Posting > Legacy Archived Main Board

Notices

Legacy Archived Main Board Business chat and general industry chat. All participation is welcome. Dont post your fucking spam here.





Check Out YnotMail

The Original Oprano Flat Board (Thanks To Sarettah!)---
Oprano Swag Shop
"History Of Porn Timeline
Reply
 
Thread Tools Display Modes
Old 10-10-2009   #1
raymor
Members
 
Join Date: Mar 2004
Posts: 42
Default Re: lighttpd and nginx are silly says to try to reduce load

Quote:
Originally Posted by Hell Puppy View Post
When I see sites running like a slug today it's usually some piss poor database design and config with some sloppy PHP running on the front of it.
Absolutely. How many times have you seen pretty much this exact same code, just with
with the variable names changed to protect the cluless:

$query = "SELECT name, subject, message FROM contact";


while($i < $max)
{
$result = mysql_query(SELECT thing, thang, thung from stuff WHERE id=$i);
$row = mysql_fetch_array($result, MYSQL_ASSOC);

echo "Name :{$row['thing']}
" .
"Subject : {$row['thang']}
" .
"Message : {$row['thung']}

";
}

Umm, excuse me Mr. "programmer", wouldn't that run 500 times faster if you did the
query once instead of 500 times?:

$result = mysql_query(SELECT thing, thang, thung from stuff WHERE id < $max);
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo "Name :{$row['thing']}
" .
"Subject : {$row['thang']}
" .
"Message : {$row['thung']}

";
}

and you know none of the tables have any indexes.


Quote:
Originally Posted by Hell Puppy View Post
I'm guessing most people today just openly trust that their hosts' SAs are competent.
Yeah I'm hoping that in the next conversation between host and webmaster when one
of them suggests "let's add another pointless proxy web server onto this machine" the
other will reply "how about commenting out the 85% of crap we're currently running but
not using instead". Competence doesn't seem to be any more common in the hosting
industry than in so many others. Sure there a few knowledgeable people, but we regularly
spend significant time educating hosts on the basics.
__________________
Ray Morris
support AT bettercgi.com

Strongbox - The next generation in site security
Throttlebox - The next generation in intelligent bandwidth control
Clonebox - Backup (disaster recovery) on steroids
Make money with your sig
raymor is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT -4. The time now is 02:40 AM..


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright Evil Empire Inc. 2006-2022