vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Community Lounge (https://vborg.vbsupport.ru/forumdisplay.php?f=13)
-   -   bad coding (https://vborg.vbsupport.ru/showthread.php?t=75514)

miz 01-31-2005 10:34 PM

bad coding
 
Code:

Page generated in 0.71573806 seconds (37.71% PHP - 62.29% MySQL) with 97 queries
heh

Erwin 01-31-2005 10:36 PM

Mmm... let me guess... showthread? 2 queries for every post?

miz 01-31-2005 10:39 PM

forumdisplay
heh

Johnny 02-01-2005 01:06 AM

thats more then bad coding. thats a crash waiting to happen. :-/

Mark.B 02-01-2005 01:10 AM

You should have seen the arcade addon for the 'statistiks' hack. Until someone rewrote it, it caused 850 queries on an average site. :o

That's been cut down to 17 now. Must have been badly coded.

Colin F 02-01-2005 05:52 AM

850 queries???

That must have been some loop...

Tony G 02-01-2005 09:01 AM

Quote:

Originally Posted by Erwin
Mmm... let me guess... showthread? 2 queries for every post?

Sounds like it, with RPG Hack, store hack, arcade hack, hack hack. :p

Revan 02-01-2005 03:47 PM

Quote:

Originally Posted by Tony G
RPG Hack

Hey.... :cry:
It only adds ONE query to showthread, and its only ran ONCE..... you big meanie!
Bwahaha j/k

deathemperor 02-01-2005 04:39 PM

how good coder avoid using too much queries ?

tips or tour somewhere ?

AN-net 02-01-2005 06:49 PM

well when using vb and queries always make sure there isnt a function that already does what your doing. try combine related queries through left joins but do not combine too many that will all together slow down the entire query. also always try to cache table from table to another so you dont have to query another table when you could have cached the data from the beginning, i.e. anything to do with counting entries could easily be cached instead of having to query a table and counting x rows.

Dean C 02-01-2005 08:21 PM

Don't forget all the other types of JOIN's too. It's amazing how much time you can spend trying to find a solution to a problem of gathering data when the answer can be solved with SQL. It's such a powerful tool available to us, it's well worth learning in-depth :)

Xenon 02-02-2005 03:32 PM

definitelly, learning SQL helps you on avoiding a lot of queries :)

Blam Forumz 02-02-2005 07:17 PM

holy balls, 850?!

And I thought 20 was alot ;(


All times are GMT. The time now is 12:03 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.01389 seconds
  • Memory Usage 1,728KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete