Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-24 Thread Per Jessen
Chris wrote: >> "Happening at the same time; simultaneous." >> >>> 100 people come to your website - that's still going to be 100 >>> connections to the database, regardless of where the results come >>> from. >> >> But if that is one every hour for a hundred hours, your max >> concurrency is 1.

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-24 Thread Chris
Per Jessen wrote: Chris wrote: Err yes - a query replied to out of cache will take less time to complete, therefore the connection will be given up faster, therefore less _concurrent_ connections. I guess my idea of concurrency is different to yours. http://en.wiktionary.org/wiki/concurrent

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-24 Thread Per Jessen
Chris wrote: >> Err yes - a query replied to out of cache will take less time to >> complete, therefore the connection will be given up faster, therefore >> less _concurrent_ connections. > > I guess my idea of concurrency is different to yours. http://en.wiktionary.org/wiki/concurrent "Happeni

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-24 Thread Chris
The number of connections is presumably only important if we speak about the number of concurrent connections. If each query can be dealt with faster due to caching, the number of concurrent connections should drop. Err no - it still has to connect to the database (thus use a connection slot)

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-23 Thread Per Jessen
Chris wrote: [snip] > will not hit the first cache because the fields are different. > http://dev.mysql.com/doc/refman/4.1/en/query-cache-how.html All very true, but when a busy website with 100 hits/interval has 25 duplicate queries, that 24% saved per interval. My only point was - when you're

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-23 Thread Chris
Per Jessen wrote: Stut wrote: Indeed, but only if you're making a lot of repetitive queries to the database. Which is typically what a busy website does :-) The query cache only works if you give it exactly the same query. That is: select blah from table where id=1; if it changes to se

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-23 Thread Per Jessen
Stut wrote: > Indeed, but only if you're making a lot of repetitive queries to the > database. Which is typically what a busy website does :-) > However, since the OP wants to reduce the number of > connections to the database, query caching may reduce the time each > connection is held for it

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-22 Thread Stut
Per Jessen wrote: Stut wrote: Stefano Esposito wrote: i'm in need to limit the numbers of conection to the database, whithout loose of functionality. There is a general strategy to achieve this? 1) Caching 2) Caching 3) Caching And if all that fails... 4) Caching And mysqls query cache do

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-22 Thread Per Jessen
Stut wrote: > Stefano Esposito wrote: >> i'm in need to limit the numbers of conection to the database, >> whithout loose of functionality. There is a general strategy to >> achieve this? > > 1) Caching > 2) Caching > 3) Caching > > And if all that fails... > > 4) Caching And mysqls query cach

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-21 Thread Stut
Stefano Esposito wrote: i'm in need to limit the numbers of conection to the database, whithout loose of functionality. There is a general strategy to achieve this? 1) Caching 2) Caching 3) Caching And if all that fails... 4) Caching Why do you need to reduce database connections? Is the si

[PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-21 Thread Stefano Esposito
Hi all, i'm in need to limit the numbers of conection to the database, whithout loose of functionality. There is a general strategy to achieve this? -- Stefano Esposito -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Insoddisfatto del tuo lavoro? Sco