Hi, On Tue, Aug 12, 2003 at 05:21:23PM +0100, Gary Broughton wrote: > Is there anybody out there who has managed to successfully configure > Win2000, IIS5, MySQL 4.0.14 and PHP 4.3.2 (ISAPI) to work with a couple > of hundred users at any one time? I have chucked absolutely everything > I can think of at this, but the MySQL (it seems) simply eats all the > available CPU within a short space of time (regardless of users) and > brings the site to a halt. >
You mention that this ran fine before. What was your previous setup? Did you switch from e.g. MS-SQL to MySQL? From MySQL 3.x to 4.x? You mention ASP vs PHP so your scripts must have changed. Did the queries change? Anyway, I run MySQL 3.23.x on Solaris, so I can't help you on specifics with your setup. But no amount of hardware will help against lacking optimization. So once you've made sure that the CPU time is actually used by MySQL, you might try to put log-slow-queries in your config. It will log slow queries in hostname-slow.log with 'slow queries' being defined as queries that run for more than 10 seconds (default). You can also try 'show processlist' from the MySQL client to see which queries are running and which queries are blocked because of locks by running queries. Once you have found slow queries, run EXPLAIN on them to determine if and how they are optimized. The manual has lots of info on optimization. If MySQL picks the wrong index, try using SELECT .... USE INDEX (...). Sometimes adding (redundant) fields containing a calculated value will allow you to create a good index (at the cost of making sure that the added field will remain consistent). There are lots of possibilities. Hope this helps. Regards, Fred. -- Fred van Engen XB Networks B.V. email: [EMAIL PROTECTED] Televisieweg 2 tel: +31 36 5462400 1322 AC Almere fax: +31 36 5462424 The Netherlands -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]