Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #31  
Old 06-05-2002, 01:53 PM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Jawelin
I suddendly grabbed your precious trick !

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
Reply With Quote
  #32  
Old 06-05-2002, 01:59 PM
MattR MattR is offline
 
Join Date: Oct 2001
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #33  
Old 06-23-2002, 04:11 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #34  
Old 08-03-2002, 11:43 AM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #35  
Old 08-03-2002, 11:50 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:33 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.03702 seconds
  • Memory Usage 2,221KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete