vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   29 queries on Forumhome !!! (https://vborg.vbsupport.ru/showthread.php?t=38471)

Jawelin 06-05-2002 01:53 PM

Quote:

Originally posted by Jawelin
I suddendly grabbed your precious trick !
:D
My question is: should a COUNT(IF()) clause much heavy than three or forur different SELECTS, on such a large tables ?

I tried to join all my queries, for example, on post table, with the tip of SUM(IF ...,1,0) AS ....
This way, with a simple alone query, I dropped down by four the counter.
Before going on with actions also on most other tables, I'm here to ask if such a small performance decrease :
Code:

Before:
Page generated in 0.34648 seconds (35.27% PHP v4.1.2 + 64.73% MySQL v3.23.45) with 36 queries.

After:
Page generated in 0.49735 seconds (23.61% PHP v4.1.2 + 76.39% MySQL v3.23.45) with 32 queries.

could be a problem ???
We are on forumhome, so I should consider to multiply this load for all the concurrent user number.

What would be worst ?
0.15 secs load overhead or 4 queries more ???
:laugh:

Thank you very much.
Bye

MattR 06-05-2002 01:59 PM

Find out what the I/O cost is and you'll have your answer. Query time is not a good indicator of total cost.

http://www.sitepointforums.com/showt...threadid=62319

Quote:

But that requires a significant amount of I/O, meaning that the MySQL engine will have to perform many disk reads (disk I/O), load it into memory (logical I/O) and throw it to your PHP client (typically over the network so network I/O). Add those together along with in the PHP overhead and you get the total IO for the query.

Velocd 06-23-2002 04:11 AM

Interesting reading ;)

I've known about the $templatesused listing for awhile now, and how it can reduce queries. I'm defiantly planning on going through most of my PHP files making sure all templates eval( 'd
are listed in this area. The problem with alot of hacks out there on vb.org, mostly the ones directly affecting index.php, and showthread.php, do not add their templates in the $templatesused area :(

So anyway, good tips, although I have only been able to understand one so far out of this thread, and thats using $templatesused. What is this other tip?--To merge queries or something?

KuraFire 08-03-2002 11:43 AM

I would still like to know how FF got so few queries on the index.php :(

He has 2-3 more hacks installed on forumhome yet about 10 queries less than I have :(

FF, can't you just _share_ your optimizations? PLEEAAASE? :D

Xenon 08-03-2002 11:50 AM

I think that would be hard...
I don't know the modifycations, but i think he has changed lots of codelines, so explaining wood be hard, and posting files isn't allowed ;)


All times are GMT. The time now is 01:47 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01174 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete