[drupal-devel] slow queries?
Hi there! Moshe alerted me to this page: http://drupal.org/admin/logs/pages?sort=desc&order=Average+page+generation+t... You will see that several search pages (but also others) took a very long time to generate (up to three minutes). While the overal effect of those few pages is probably low, I still think we should discover what causes it. I'd especially like to know why the maximum php executiomn time does not kick in. Can anybody enlighten me? Cheers, Gerhard
On Jun 25, 2005, at 11:40 AM, Gerhard Killesreiter wrote:
I'd especially like to know why the maximum php executiomn time does not kick in.
I'm not special enough to follow your link. But, PHP's max execution time is based on the time PHP takes to execute code itself. Waiting around for DB queries or other operations aren't part of the equation. Allie Micka pajunas interactive, inc. http://www.pajunas.com/ scalable web hosting and open source solutions
On Sat, 25 Jun 2005, Allie Micka wrote:
On Jun 25, 2005, at 11:40 AM, Gerhard Killesreiter wrote:
I'd especially like to know why the maximum php executiomn time does not kick in.
I'm not special enough to follow your link.
Sorry, i was too lazy to prepare a screenshot.
But, PHP's max execution time is based on the time PHP takes to execute code itself. Waiting around for DB queries or other operations aren't part of the equation.
I see, thanks for the clarification. Is there a similar time limit for mysql queries alone? I don't think that a user will wait up to 3 minutes for a page to completely render. Cheers, Gerhard
I'm not 100% sure - but in fact the max execution time is the time that a single http request will take to clear. I'm basing this on another php application that i have a lot of experience with. In that application there is an install utility. It will routinely time out during a particular data insert if the machine (DB) is slow. I believe one can see exactly this behavior with the CivicSpace install and the location tables (which are large). Put simply in both these cases on slow (DB) machines you will see a timeout at exactly 30 seconds - upping the max execution time will improve this. However, as I said - I may be mistaken. Dan
On Jun 25, 2005, at 11:40 AM, Gerhard Killesreiter wrote:
I'd especially like to know why the maximum php executiomn time does not kick in.
I'm not special enough to follow your link. But, PHP's max execution time is based on the time PHP takes to execute code itself. Waiting around for DB queries or other operations aren't part of the equation.
Allie Micka pajunas interactive, inc. http://www.pajunas.com/
scalable web hosting and open source solutions
ahhh i re-read Allie's post and now see what he was saying (sorry). This explains the behavior I describe below - in which this user *is* initiating that query - as opposed to waiting for someone else's to execute.
I'm not 100% sure - but in fact the max execution time is the time that a single http request will take to clear. I'm basing this on another php application that i have a lot of experience with. In that application there is an install utility. It will routinely time out during a particular data insert if the machine (DB) is slow. I believe one can see exactly this behavior with the CivicSpace install and the location tables (which are large). Put simply in both these cases on slow (DB) machines you will see a timeout at exactly 30 seconds - upping the max execution time will improve this. However, as I said - I may be mistaken.
Dan
On Jun 25, 2005, at 11:40 AM, Gerhard Killesreiter wrote:
I'd especially like to know why the maximum php executiomn time does not kick in.
I'm not special enough to follow your link. But, PHP's max execution time is based on the time PHP takes to execute code itself. Waiting around for DB queries or other operations aren't part of the equation.
Allie Micka pajunas interactive, inc. http://www.pajunas.com/
scalable web hosting and open source solutions
steven probably understands this better than anyone? can anything be done here, steven?
Hi there!
Moshe alerted me to this page:
http://drupal.org/admin/logs/pages?sort=desc&order=Average+page+generation+t...
You will see that several search pages (but also others) took a very long time to generate (up to three minutes). While the overal effect of those few pages is probably low, I still think we should discover what causes it. I'd especially like to know why the maximum php executiomn time does not kick in.
Can anybody enlighten me?
Cheers, Gerhard
steven probably understands this better than anyone? can anything be done here, steven?
The only problem I know of is leading wildcards in search terms. These prevent the index on the word column from being used, hence a full table scan is done. This problem has gotten worse since the "try leading wildcards automatically if nothing was found" patch. I have some architectural changes for search.module in my head which might help with this (though the main point is to introduce phrase searching), but I won't have time for this until my exams end. Steven Wittens
Remember it is not only a question of how long it takes for a query to execute - but whether that operation is blocking other queries. It is one thing for 100 people to each wait 10 seconds for a query to complete - quite another for the first person to wait 10 seconds and the last to wait 1000. I've seen this kind of behavior with php/mysql in a large production environment and it should be avoided obvsiosly. Dan
steven probably understands this better than anyone? can anything be done here, steven?
The only problem I know of is leading wildcards in search terms. These prevent the index on the word column from being used, hence a full table scan is done. This problem has gotten worse since the "try leading wildcards automatically if nothing was found" patch.
I have some architectural changes for search.module in my head which might help with this (though the main point is to introduce phrase searching), but I won't have time for this until my exams end.
Steven Wittens
Hi there!
Moshe alerted me to this page:
http://drupal.org/admin/logs/pages?sort=desc&order=Average+page+generation+t...
i get access denied :)
You will see that several search pages (but also others) took a very long time to generate (up to three minutes). While the overal effect of those few pages is probably low, I still think we should discover what causes it. I'd especially like to know why the maximum php executiomn time does not kick in.
Can anybody enlighten me?
Cheers, Gerhard
participants (5)
-
Allie Micka -
Dan Robinson -
Gerhard Killesreiter -
Moshe Weitzman -
Steven Wittens