RE: [PHP-DB] Performance problems?

2002-11-02 Thread John W. Holmes
What's the structure of your database table? Whofor and id should have
indexes on them to speed up queries like this.

---John Holmes...

 -Original Message-
 From: Leif K-Brooks [mailto:eurleif;buyer-brokerage.com]
 Sent: Saturday, November 02, 2002 1:21 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Performance problems?
 
 I've been optimizing scripts in an attempt to speed my friend's site
up,
 and I believe I've found the source of the performance problems.  When
I
 comment the following page load time changes from around 6 seconds to
 less than .5 of a second.
 
 if($loggedin){
 $events = mysql_query(select * from events where
 whofor='{$userinfo['id']}' order by id desc limit 1);
 if(mysql_num_rows($events) == 1){
 $events = mysql_fetch_array($events);
 print  END
 p align=centera

href={$basepath}doevent.php?id={$events['id']}{$events['message']}/a

 /p
 END;
 }
 }
 
 This code checks for events (new mail, etc.) that the user may have
and
 dispays them.  Any idea on what makes it perform this badly?
 --
 
 The above message is encrypted with double rot13 encoding.  Any
 unauthorized attempt to decrypt it will be prosecuted to the full
extent
 of the law.
 
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Performance problems?

2002-11-01 Thread Leif K-Brooks
I've been optimizing scripts in an attempt to speed my friend's site up, 
and I believe I've found the source of the performance problems.  When I 
comment the following page load time changes from around 6 seconds to 
less than .5 of a second.

   if($loggedin){
   $events = mysql_query(select * from events where 
whofor='{$userinfo['id']}' order by id desc limit 1);
   if(mysql_num_rows($events) == 1){
   $events = mysql_fetch_array($events);
   print  END
   p align=centera 
href={$basepath}doevent.php?id={$events['id']}{$events['message']}/a/p
   END;
   }
   }

This code checks for events (new mail, etc.) that the user may have and 
dispays them.  Any idea on what makes it perform this badly?
--

The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Performance problems in NC

2001-10-29 Thread Andy

Hi there,

I have problems with the performance while using NC. It workes fine with IE.
As soon as I access the db. It takes aproximatelly 1 -2 min till I see the
page.

Does anybody know some help?

Thank you

Andy



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Performance problems in NC

2001-10-29 Thread Mark Newnham

This could be due to missing tags such as /body and /html

 -Original Message-
 From: Andy [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 29, 2001 6:41 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Performance problems in NC
 
 
 Hi there,
 
 I have problems with the performance while using NC. It 
 workes fine with IE.
 As soon as I access the db. It takes aproximatelly 1 -2 min 
 till I see the
 page.
 
 Does anybody know some help?
 
 Thank you
 
 Andy
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: 
 [EMAIL PROTECTED]
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]