With that information, no, I don't think upping the maximum connections
would have no noticeable affect.
From what you've said, regarding generating pages once a day, I'm not
convinced your database server is entirely the problem, as doing that would
reduce the load on the database server quite a lot. Do you know how your
host arrived at the conclusion that "this saturation is due to a bad
management of connections between ASP and MySQL" ?
I don't believe changing the database server would help, but I've just read
the following on
http://dev.mysql.com/doc/refman/5.0/...functions.html :
The above reads "If the preceding SELECT statement does not include the
SQL_CALC_FOUND_ROWS option, then FOUND_ROWS() may return a different result
when LIMIT is used than when it is not."
The word "may" seems to be an understatement. Everytime I run a SELECT with
LIMIT, FOUND_ROWS() returns whatever number I put after LIMIT. E.g. after
SELECT * FROM table LIMIT 50
FOUND_ROWS() will return 50.
But if I do
SELECT * FROM table LIMIT 10, 10,
FOUND_ROWS() will return 20 though.

This is annoying, since I need this information from a 20,000-row table
fulltext search, and a 0,008 second search then suddenly takes about 20
seconds... Haven't found a workaround yet...
(This is the comment by [name withheld] on January 2 2006 7:52pm)
That to me suggests that SQL_CALC_FOUND_ROWS might be quite inefficient. I
assume in your query that the LIMIT value is 30, and you have a query
similar to:
SELECT SQL_CALC_FOUND_ROWS AdvertID, AdvertTitle, AdvertPrice FROM Adverts
WHERE AdvertParentCategory = 318 LIMIT 30
I would suggest _testing_ removing SQL_CALC_FOUND_ROWS from here, and
instead of "SELECT FOUND_ROWS()" using:
SELECT COUNT(*) FROM Adverts WHERE AdvertParentCategory = 318
(I know yours is more complex as it also deals with child categories, but
this should give you an idea what I mean.)
However, I don't know if this will have much affect as I'm still not sure
exactly what the problem is. As I've said, it could be to do with the
webserver, and we might be going down the wrong path. Have you used the
performance counters to log both hard disk usage (accesses, throughput, etc)
and CPU usage over the course of a day or two for both machines? If not, I
would suggest you do this and see if maybe it's actually your harddrives
getting saturated, in which case RAID rather than more CPU would help.
If you have msn messenger (or ICQ) and would like to talk "in person", we
might be able to narrow down the problem a bit quicker! Email me if you want
to take this route, and we can discuss it.
newsgroupsdotspamatjevonfarrdotcom, replacing the 2 "dot"s and "at" with the
correct email figures ("." and "@").
Jevon
"Fred" <> wrote in message
news:43cd1ef3$0$6671$...
> Jevon a écrit :
>> You could probably up your max_connections. It's set to over 1000 on ours
>> and is working ok. Try 400 to start with, see if it has any affect.
>
>
> In Mysql Administraor, I have an average of 25 connections. Is it
> necessary to set max_connections to 400 in that case ?
>
>> I assume you read the following, taken from the "default" ini file,
>> talking about the query_cache values?
>> # Note: In case your tables change very often or if your queries are
>> # textually different every time, the query cache may result in a
>> # slowdown instead of a performance improvement.
>
> It seems to be the case for me. We have at least 500 changes par day in
> the main table.
>
> I'll try to change these values and see what happends.
>
>> For example, the page
>> http://www.agriaffaires.co.uk/rubriq...8-Tractors.asp has a long list
>> of page numbers - how is the total number calculated?
>> And on the front page, how is the list of categories retrieved? Assuming
>> you are using a recent version of MySQL I believe you could achieve the
>> list with one query, but depending on the code it could be doing it in 3
>> or more.
>
> In fact, the list on the main page (and many other parts like footers) are
> html pages generated from the database once a day.
>
> For the list, I have only one request, using LIMIT, SQL_CALC_FOUND_ROWS
> And "SELECT FOUND_ROWS()" to retrieve the total number of ads.
>
> I use MySQL 4.1.15.
> Will MySQL 5 or SQL Server help me to solve my problems ?
>
> Thanks,
>
> Fred