Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #31  
Old 11-02-2002, 07:54 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes. Replace that with the code posted.
Reply With Quote
  #32  
Old 11-02-2002, 08:57 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its good

That and a few other modifications have reduced the forumhome to just 29 Queries!

Satan
Reply With Quote
  #33  
Old 11-02-2002, 09:34 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have another question for you php and mysql experts!

Lets say there is a line like this:

eval("\$closeopenthread = \"".gettemplate("newthread_closeopen")."\";");

That line is in my showthread.php file. It has the eval thing, does that mean it's adding a query? If so, how do I change it so it doesn't?
Reply With Quote
  #34  
Old 11-02-2002, 09:46 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did this explain thing and what on earth does all the stuff mean

Query: SELECT template FROM template WHERE title='colforumtablefooter' AND (templatesetid=-1 OR templatesetid=1) ORDER BY templatesetid DESC LIMIT 1
Time before: 0.51396095752716
Time after: 0.51483500003815

table type possible_keys key key_len ref rows Extra
template range title title 32 2 where used; Using filesort


Like that, I just don't know, I mean it's the template table, but I don't understand what to do?

Ok this looks bad:

Query: UPDATE user SET lastactivity=1036276130 WHERE userid=1 AND lastactivity<1036276130
Time before: 0.19920098781586
Time after: 0.2000550031662

--------------------------------------------------------------------------------

Query: UPDATE user SET lastactivity=1036279082 WHERE userid=1 AND lastactivity<1036279082
Time before: 0.20031905174255
Time after: 0.200718998909

--------------------------------------------------------------------------------

Query: UPDATE user SET lastactivity=1036278622 WHERE userid=1 AND lastactivity<1036278622
Time before: 0.20096302032471
Time after: 0.20142102241516

--------------------------------------------------------------------------------

Query: UPDATE user SET lastactivity=1036278025 WHERE userid=1 AND lastactivity<1036278025
Time before: 0.20167303085327
Time after: 0.20206105709076

--------------------------------------------------------------------------------

Query: UPDATE user SET lastactivity=1036277677 WHERE userid=1 AND lastactivity<1036277677
Time before: 0.20230603218079
Time after: 0.20269000530243

--------------------------------------------------------------------------------

Query: UPDATE user SET lastactivity=1036277096 WHERE userid=1 AND lastactivity<1036277096
Time before: 0.20292901992798
Time after: 0.20330798625946

--------------------------------------------------------------------------------

Query: UPDATE user SET lastactivity=1036276868 WHERE userid=1 AND lastactivity<1036276868
Time before: 0.20354700088501
Time after: 0.20392203330994

--------------------------------------------------------------------------------

Query: DELETE FROM session WHERE lastactivity<1036280063
Time before: 0.2041449546814
Time after: 0.20440900325775

--------------------------------------------------------------------------------

Query: DELETE FROM search WHERE dateline<1035675763
Time before: 0.20457899570465
Time after: 0.2589670419693



Those are the last few queries in showthread...
Reply With Quote
  #35  
Old 11-02-2002, 09:56 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I perfer using showqueries=1

I'm not sure as to what the tables that are produced mean, but you can see each query that is run, and the time each one is taking.

As for the eval bit, if the template name is not in $templatesused before global.php is required then one extra query is added, otherwise no extra query for it.
Reply With Quote
  #36  
Old 11-02-2002, 10:49 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh right so if there's an eval code line, I just get the template name from it and put it in templatesused and that's the query gone?
Reply With Quote
  #37  
Old 11-02-2002, 10:51 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you'll find that all of them in the eval statement is in the templatesused.

Just ones that aren't called often or rarely are left out as it would be a waste of time to fetch those pages with the rest.
Reply With Quote
  #38  
Old 11-03-2002, 04:43 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@ N9NE - let me guess, you have the "total user time online" hack by gforce2k installed. Those are extra queries to reset the time for when you are online I think.
Reply With Quote
  #39  
Old 11-03-2002, 05:58 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So the Total Time Online hack is adding about 7 queries to showthread?
Reply With Quote
  #40  
Old 11-03-2002, 06:12 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Only if you have applied it wrong, I've checked mine and I don't have 7 queries for it.
Reply With Quote
Reply

Thread Tools
Display Modes

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 06:40 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04305 seconds
  • Memory Usage 2,245KB
  • Queries Executed 11 (?)
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)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_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