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
  #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
  #22  
Old 10-25-2002, 01:07 PM
TheSaint-AeD's Avatar
TheSaint-AeD TheSaint-AeD is offline
 
Join Date: Sep 2002
Location: Munich
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@ Xenon: Hab mich mal in Deinem Forum registriert, werde so schnell wie möglich daran arbeiten.
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 01:05 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.06326 seconds
  • Memory Usage 2,282KB
  • Queries Executed 21 (?)
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
  • (4)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
  • (1)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)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