vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Community Lounge (https://vborg.vbsupport.ru/forumdisplay.php?f=13)
-   -   Question Reguarding Queries.... (https://vborg.vbsupport.ru/showthread.php?t=77076)

Gio~Logist 02-26-2005 01:39 PM

Question Reguarding Queries....
 
My php knowledge is still at a below average level, however, a question has come to my mind reguarding php hackers. What is the difference between the hacks that use queries and those that dont? Do they still have the same amount of accuracy and effect? Before i redid my board i had 163 queries. Now i have even more hacks including the ones i had before (but different versions) and i only hadve 42 queries. Why use unnecessary queries in the first place? What's the difference?

filburt1 02-26-2005 03:17 PM

Queries are necessary to retrieve, manipulate, and store information in the database.

Any page that uses a ridiculous number of queries is querying in a loop, which is bad practice.

Gio~Logist 02-26-2005 07:11 PM

oh i see

Brad 03-01-2005 06:28 AM

One way or anthor is not always right. Each situation requires testing to find the best methods of getting the page to load quicker.

As filburt said all queries do is retrive, store, and modify information in your database. Having many queries per page can be bad as you are putting strain on the database.

Ever open multiple large files on your home pc only to have it slow down while the HDD is begin read? Same thing here.

163 is a very high number, so is 43, you'll want to take a look at your forum and figure out exactly what is making all these calls to mySQL. You are probbly running a lot of hacks you don't need, of these hacks many may not be optimized correctly.

At the end of the day you should not base what you install on if it adds an extra query or not. Say you make two queries for similar info, its possible to combine them into one large query. When using 2 queries it takes .1 seconds per query or .2 seconds for both to run. But when combined the large query takes .5 seconds to execute.

In that case using 2 small queries is faster then one large one. In some cases it can be the other way around. So you should always test and figure out the best method for your forum/server.


All times are GMT. The time now is 01:01 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.01049 seconds
  • Memory Usage 1,708KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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