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

Reply
 
Thread Tools
new posts doubling page queries? Details »»
new posts doubling page queries?
Version: , by EchoHype.com EchoHype.com is offline
Developer Last Online: Jan 2006 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 03-02-2003 Last Update: Never Installs: 0
 
No support by the author.

Alright,

After I installed the store hack and such, I noticed that every time there is a post added in a thread, the queries jump drastically.

Example: http://www.echohype.com/forums/showt...=&threadid=307

My partner thought it may be a problem inside showthread, and he thinks that the postbit/posts are being told to do double.

Attached is the current showthread.php

Any help is greatly appreciated!

Show Your Support

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

Comments
  #2  
Old 03-02-2003, 11:39 PM
mr e's Avatar
mr e mr e is offline
 
Join Date: Dec 2001
Posts: 461
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

holy crap, 282 queries!

it looks like you have a block of code repeated at line 271, besides that i dunno

but, i dont think your allowed to post full php files
Reply With Quote
  #3  
Old 03-02-2003, 11:40 PM
EchoHype.com's Avatar
EchoHype.com EchoHype.com is offline
 
Join Date: Mar 2002
Location: Harrisburg, PA
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh......hmm.........sorry about that, I will remove it and look at the repeated block!

thanks

EDIT: couldn't seem to find that duplicate block your talking about?
Reply With Quote
  #4  
Old 03-02-2003, 11:46 PM
mr e's Avatar
mr e mr e is offline
 
Join Date: Dec 2001
Posts: 461
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@line 271 there's some code, and below that it looks like it repeats...maybe it doesn't, but it sure looked close
Reply With Quote
  #5  
Old 03-02-2003, 11:51 PM
EchoHype.com's Avatar
EchoHype.com EchoHype.com is offline
 
Join Date: Mar 2002
Location: Harrisburg, PA
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, after checking the instructions of the store hack, that block is supposed to be like that.

......hmm
Reply With Quote
  #6  
Old 03-02-2003, 11:53 PM
mr e's Avatar
mr e mr e is offline
 
Join Date: Dec 2001
Posts: 461
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there any queries inside a while loop?
Reply With Quote
  #7  
Old 03-03-2003, 12:00 AM
EchoHype.com's Avatar
EchoHype.com EchoHype.com is offline
 
Join Date: Mar 2002
Location: Harrisburg, PA
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how do you mean?

here's what is from the instructions of the store hack

Code:
if ($noshutdownfunc) {
  $DB_site->query("UPDATE thread SET views=views+1 WHERE threadid='$threadid'");
  
  // Store hack by Lesane

  $storeview=$DB_site->query_first("select views, postuserid from thread WHERE threadid='$threadid'");
  $views=$storeview[views];
  $postuserid=$storeview[postuserid];

  $storeadmin = $DB_site->query_first("SELECT * FROM storeadmin");
  $view1=$storeadmin[view1];
  $view2=$storeadmin[view2];
  $view3=$storeadmin[view3];
  $view4=$storeadmin[view4];
  $view5=$storeadmin[view5];
  $viewpoint1=$storeadmin[vpoint1];
  $viewpoint2=$storeadmin[vpoint2];
  $viewpoint3=$storeadmin[vpoint3];
  $viewpoint4=$storeadmin[vpoint4];
  $viewpoint5=$storeadmin[vpoint5];

  if ($views == $view1) 
  {
	$DB_site->query("UPDATE user SET storep=storep+$viewpoint1 where userid='$postuserid'");
  }
  elseif ($views == $view2) 
  {
	$DB_site->query("UPDATE user SET storep=storep+$viewpoint2 where userid='$postuserid'");
  }
  elseif ($views == $view3) 
  {
	$DB_site->query("UPDATE user SET storep=storep+$viewpoint3 where userid='$postuserid'");
  }
  elseif ($views == $view4) 
  {
	$DB_site->query("UPDATE user SET storep=storep+$viewpoint4 where userid='$postuserid'");
  }
  elseif ($views == $view5) 
  {
	$DB_site->query("UPDATE user SET storep=storep+$viewpoint5 where userid='$postuserid'");
  }
  
} else {
  $shutdownqueries[]="UPDATE LOW_PRIORITY thread SET views=views+1 WHERE threadid='$threadid'";
  
  // Store hack by Lesane

  $storeview=$DB_site->query_first("select views, postuserid from thread WHERE threadid='$threadid'");
  $views=$storeview[views];
  $postuserid=$storeview[postuserid];

 $storeadmin = $DB_site->query_first("SELECT * FROM storeadmin");
  $view1=$storeadmin[view1];
  $view2=$storeadmin[view2];
  $view3=$storeadmin[view3];
  $view4=$storeadmin[view4];
  $view5=$storeadmin[view5];
  $viewpoint1=$storeadmin[vpoint1];
  $viewpoint2=$storeadmin[vpoint2];
  $viewpoint3=$storeadmin[vpoint3];
  $viewpoint4=$storeadmin[vpoint4];
  $viewpoint5=$storeadmin[vpoint5];
  

  if ($views == $view1) 
  {
	$DB_site->query("UPDATE user SET storep=storep+$viewpoint1 where userid='$postuserid'");
  }
  elseif ($views == $view2) 
  {
	$DB_site->query("UPDATE user SET storep=storep+$viewpoint2 where userid='$postuserid'");
  }
  elseif ($views == $view3) 
  {
	$DB_site->query("UPDATE user SET storep=storep+$viewpoint3 where userid='$postuserid'");
  }
  elseif ($views == $view4) 
  {
	$DB_site->query("UPDATE user SET storep=storep+$viewpoint4 where userid='$postuserid'");
  }
  elseif ($views == $view5) 
  {
	$DB_site->query("UPDATE user SET storep=storep+$viewpoint5 where userid='$postuserid'");
  }
}
Reply With Quote
  #8  
Old 03-03-2003, 12:01 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This will kill your server.

Page generated in 0.73848796 seconds (49.96% PHP - 50.04% MySQL) with 282 queries.

There is something wrong with how you've installed the Store Hack I'm sure. Uninstall it out of showthreads, and reinstall it and see if that fixes it.
Reply With Quote
  #9  
Old 03-03-2003, 12:14 AM
EchoHype.com's Avatar
EchoHype.com EchoHype.com is offline
 
Join Date: Mar 2002
Location: Harrisburg, PA
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ugh,

I reverted them, uploaded, was still there. then reinstalled the changes and still there........

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 10:02 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.04219 seconds
  • Memory Usage 2,280KB
  • Queries Executed 22 (?)
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_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete