Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Serious Query Problem Details »»
Serious Query Problem
Version: , by TheSaint-AeD TheSaint-AeD is offline
Developer Last Online: Jan 2004 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 10-22-2002 Last Update: Never Installs: 0
 
No support by the author.

I have a serious Problem with the Querries in showthread.php. Everytime I post in an Thread, next time I open the thread it needs exactly 2 Querries more. As I have 25 Threads / Page this means 50 additional Querries on a full Page! As I already have about 25 Querries as default, i got between 30-80 Querries in a Thread

Can anybody explain to my why this happens and why other users on my board don't seem to add so many querries per post? I have access-masks enabled and Quick-Reply + Lesanes Award-System + Quick Delete installed.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 10-23-2002, 08:06 PM
TheSaint-AeD's Avatar
TheSaint-AeD TheSaint-AeD is offline
 
Join Date: Sep 2002
Location: Munich
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I already deinstalled the Hack and went back to less than 40 Querries in showthread .

@ Xenon: Danke trotzdem vielmals f?r die schnelle und kompetente Hilfe
Reply With Quote
  #13  
Old 10-23-2002, 09:29 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you're welcome

hmm, du solltest nicht ?ber 35 kommen bei showthread, unter 30 w?re noch besser
Reply With Quote
  #14  
Old 10-24-2002, 04:52 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by TheSaint-AeD
I already deinstalled the Hack and went back to less than 40 Querries in showthread .
40 queries is still significant. Try to reduce it a bit more - ideally to 25 or less, since showthread is the most commonly accessed page on a forum.
Reply With Quote
  #15  
Old 10-24-2002, 08:37 AM
TheSaint-AeD's Avatar
TheSaint-AeD TheSaint-AeD is offline
 
Join Date: Sep 2002
Location: Munich
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hrhr

I know that ~35 Querries is a lot on showthread, but my Servers are good enough to face this, and I don't wanna miss any of the Features causing these Querries. Visit me on http://foren.gslallianz.de if you want Still a lot under Construction, but already some interessting things to see

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

Xenon, there seems to be another Query-Loop. Seems to have something to do with the Quick-Delete Post Hack, I'm investigating atm. and post the Results as soon as possible.
Reply With Quote
  #16  
Old 10-24-2002, 08:50 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes this is important to put away

don't use queries in loops .

most of the time these queries can be avoided with good joined queries.... but not always
Reply With Quote
  #17  
Old 10-24-2002, 09:05 AM
TheSaint-AeD's Avatar
TheSaint-AeD TheSaint-AeD is offline
 
Join Date: Sep 2002
Location: Munich
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wtf, this is getting weird... ok, here we are:


Thread has 1 Post, User is Moderator:
Quote:
Seite generiert in 0.20259094 Sekunden (74.67% PHP - 25.33% MySQL) mit 33 queries.
Same Thread, User is no Mod:
Quote:
Seite generiert in 0.18163002 Sekunden (71.52% PHP - 28.48% MySQL) mit 35 queries.
Now we are 10 Posts later...

User is Moderator:
Quote:
Seite generiert in 0.38245904 Sekunden (84.50% PHP - 15.50% MySQL) mit 42 queries.
In Comparison to that, same Thread, no Mod:
Quote:
Seite generiert in 0.36550105 Sekunden (82.41% PHP - 17.59% MySQL) mit 53 queries.

Moderators get +1 Query / Post, Non-Moderators even +2! There was I time I was running the Award-Hack aswell as the Quick-Delete-Post Hack and had 40 Posts / Page. This means, my Users must have been at 150+ Querries!!! I'm wondering how my Server got through this, with my Board having ~150 highly active Users in average / day.
Reply With Quote
  #18  
Old 10-24-2002, 09:19 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes, that's really a problem

somewhere in your whileloop ther is one or two queries too much.

carefully recheck the getpostbit function and the loop in showthread.php where getpostbit is called
Reply With Quote
  #19  
Old 10-24-2002, 09:37 AM
TheSaint-AeD's Avatar
TheSaint-AeD TheSaint-AeD is offline
 
Join Date: Sep 2002
Location: Munich
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

k, removing the hack cleared it out. I got no more query-loops and I'm back at unbelievable 32 querries performed in Showthread. Here is the wrong Code:

PHP Code:
if ($action=="deletethispost") {
  
$firstpost=$DB_site->query_first("SELECT postid,dateline FROM post WHERE threadid='$threadid' ORDER BY dateline LIMIT 1");
  if (
$postid==$firstpost[postid]) {
    if (
$getperms[candeletethread]) {
      
deletethread($threadinfo[threadid],$foruminfo[countposts]);
      
updateforumcount($threadinfo[forumid]);

      
$url="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
      eval(
"standardredirect(\"".gettemplate("redirect_deletethread")."\",\"$url\");");
    } else {
      
show_nopermission();
    }

  } else {
    
$foruminfo=getforuminfo($threadinfo[forumid]);
    
deletepost($postid,$foruminfo[countposts],$threadinfo[threadid]);

    
updatethreadcount($threadinfo[threadid]);
    
updateforumcount($threadinfo[forumid]);

    
$url="showthread.php?s=$session[sessionhash]&threadid=$threadinfo[threadid]";
    eval(
"standardredirect(\"".gettemplate("redirect_deletepost")."\",\"$url\");");
  }

I'm wondering why I was the first User noticing this, as neither the award-hack nor the quick-delete-post hack are that unpopulare. I sent Teck a PN with a Link to this Thread.
Reply With Quote
  #20  
Old 10-24-2002, 11:24 AM
TheSaint-AeD's Avatar
TheSaint-AeD TheSaint-AeD is offline
 
Join Date: Sep 2002
Location: Munich
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, TECK posted a Code which doesn't use Mod or no-Mod but Usergroup-ID's. Not as comfortable as the first Version, but 50 Querries less leave no Choice Does anybody has an Idea for a fully working Code?

@ Xenon: Die Foren mal besucht? Wenn Dir was davon gef?llt (z. B. einer der Styles) einfach PN, dann schick ich Ihn Dir, ist das Wenigste was ich Dir anbieten kann. Danke nochmal f?r die Hilfe.
Reply With Quote
  #21  
Old 10-24-2002, 05:16 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i think TECK will come up with a comfortable and fully working code, i know him

just have to wait

Hmm, nur wenns wirklich keine umst?nde macht, der Galaktic Blue Style w?rde nach kleinen ?nderungen gut zu meinem Master of Orion3 unterforum passen
Meine Addy Xenon@ und dann die url von meinem Forum
btw. dein Stylish green erinnert mich an was
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 12:08 PM.


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.04388 seconds
  • Memory Usage 2,324KB
  • Queries Executed 25 (?)
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)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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