Jump to content

PM's are 75+ Queries?!


mld11

Recommended Posts

Posted

I'm speeding up my server, and was cross referencing executed queries per unique page @ total users to the server load, and found that in most instances (Index, Forum View, Topic View, Downloads (Index, Category, File) View, Members) the executed query count has a highest value of 20 (at least on my installation).

Now, I understand that the # changes for each forum/topic, etc. but 95% of the time, nothing goes above 20 queries, except private conversations viewing goes above a whopping 70.


Is there any way that it can be loaded with less queries?

Posted

I wouldn't get too hung up on the number of queries - in most instances the server will use the cached execution plan and run them like lightning anyway. You should be more worried about whether said queries use any constructs that invalidate cached execution plans, or whether they join or query any table by a non-indexed column.

Posted

just looked at this and you seem right, looking at the queries it seems to run this query again and again:

SELECT * FROM ibf_skin_cache WHERE cache_set_id=1 AND cache_value_1='skin_1'

looks like some of the code needs to be refactored as it seems to be caught in a loop somewhere. 75 queries is alot on any server even if they are cached. It should probably be looked into.

Posted

[quote name='Jaggi' date='12 November 2009 - 04:47 AM' timestamp='1258019278' post='1878467']
just looked at this and you seem right, looking at the queries it seems to run this query again and again:

SELECT * FROM ibf_skin_cache WHERE cache_set_id=1 AND cache_value_1='skin_1'

looks like some of the code needs to be refactored as it seems to be caught in a loop somewhere. 75 queries is alot on any server even if they are cached. It should probably be looked into.


Thanks for confirming this, makes me feel better knowing that a Community Dev has "confirmed" the issue. :)


[quote name='m4rtin' date='12 November 2009 - 06:28 AM' timestamp='1258025311' post='1878476']
http://community.invisionpower.com/index.php?app=tracker&showissue=19614


Thanks for reporting it. :)

Posted

[quote name='Jaggi' date='12 November 2009 - 09:47 AM' timestamp='1258019278' post='1878467']75 queries is alot on any server even if they are cached. It should probably be looked into.


Whilst you're right that it should be looked into (and I'm sure it will be), it's a little naive to make judgements about what is a lot for "any server", without any knowledge or context.

Our database servers regularly handle well over 1,000 queries a second each, without even a hint of struggling. :)

Posted

[quote name='Dan C' date='12 November 2009 - 04:15 PM' timestamp='1258042508' post='1878529']
Whilst you're right that it should be looked into (and I'm sure it will be), it's a little naive to make judgements about what is a lot for "any server", without any knowledge or context.

Our database servers regularly handle well over 1,000 queries a second each, without even a hint of struggling. :)



maybe but i've never in my entire programming life had a page that runs 75 db queries (cept for db updating scripts/cronjobs, but speaking pages accesible by webserver). The thought of having that many just gives me chills and would keep me up at night.

to put that into context if you website had about 100 users online all running 75 queries each = 7500, i think for any webserver thats quite a few. Might not bring it down but enough to make you worry. (oh ipb has summit like 600 online atm).

Posted

I get a bit crazy when query counts get >= 15 for page loads :blink:. Some advanced pages usually reach no more than 20 (although it's rare).

Posted

[quote name='Jaggi' date='12 November 2009 - 04:18 PM' timestamp='1258042684' post='1878532']
maybe but i've never in my entire programming life had a page that runs 75 db queries (cept for db updating scripts/cronjobs, but speaking pages accesible by webserver). The thought of having that many just gives me chills and would keep me up at night.

to put that into context if you website had about 100 users online all running 75 queries each = 7500, i think for any webserver thats quite a few. Might not bring it down but enough to make you worry. (oh ipb has summit like 600 online atm).


++

I often have 1k people online. Imagine how I feel.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...