vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How many queries are too many? (https://vborg.vbsupport.ru/showthread.php?t=36133)

Gutspiller 03-14-2002 06:29 PM

How many queries are too many?
 
I just installed a hack that shows the time it took to generate a page, and it also shows how many queries are taking place on that page.

On my front page I have 92 queries.
On forum pages I have 23 queries.
Inside a thread I have between 28 and 32 queries.

What exactly accounts for queries? How much do they slow down the pages, and should I be worried that my front page has soo many?

If somebody could get me in the know I would greatly appreciate it.

Thanks.

Admin 03-15-2002 11:40 AM

A query is what sent to the MySQL server in order to get data from the database.
The more queries you have, the slower the page will be. 92 queries on the front is a huge number, my guess is that you have some messed up which queries the database for every forum you have.

If you look in the stats, you will usually see most of the time the page is doing MySQL stuff, and the time it wastes on PHP is much smaller.

Gutspiller 03-15-2002 02:48 PM

FireFly, do you have any suggestions on what I can do or where I could start to find out why there are soo many? I really need to make my forum as much as possible, non server intensive.

If you can help me or give me some pointers on where to start I would greatly appreciate it.

Thanks.

Admin 03-15-2002 02:53 PM

Which forum are you talking about? I can take a look at the queries and see what's wrong.

Gutspiller 03-15-2002 02:58 PM

Here's the front page: http://www.theforumz.com/forumz/index.php?s=

that has 93 queries. Could it be all the hacks I have installed and that I haven't messed anything up?

Admin 03-15-2002 03:06 PM

It has 22 queries:
http://www.theforumz.com/forumz/index.php?s=&explain=1
The hack is lying.

Gutspiller 03-15-2002 03:18 PM

1 Attachment(s)
How do you know? When I go to that explained thing I got this when I scroll past a huge page of details.

How did you find out there is only 22?

TWTCommish 03-15-2002 03:21 PM

I think these queries are only made for Admins, Mods, or, fairly likely, logged in users...but not people like Chen or I or whomever.

Gutspiller 03-15-2002 03:40 PM

hmm, so WTH is the forum doing for mods and admins that adds soo many more queries? I mean, maybe a dropdown box at the bottom of the page, but that's about it. :confused:

Admin 03-15-2002 05:04 PM

Setup a test account we can use.

Gutspiller 03-15-2002 05:29 PM

Quote:

Originally posted by FireFly
Setup a test account we can use.
What exactly do you mean? If it only does it on admins and mods? Create an account for a mod, but then restrict all the mod rights for that one account?

BTW this -> :confused: does not look confused, he looks stoned. :D

Admin 03-15-2002 05:38 PM

No, just a regular user test account.

Gutspiller 03-15-2002 06:51 PM

L: Test
P:Tester

TWTCommish 03-15-2002 06:55 PM

I could be wrong, but it looks like you've got a query being sent for EACH forum you have there...each of them grabbing the number of threads. 'Sup with that? :)

Gutspiller 03-15-2002 07:29 PM

i don't know. What is up with that? You are the pro here, not me. :D

TWTCommish 03-15-2002 07:34 PM

Well, if you added some hack or code modification that adds another query for each forum on your forum main page, being a "pro" wouldn't help me...because I wouldn't know how it got there. :D

Gutspiller 03-15-2002 07:39 PM

Well, there are 2 hacks I can think of. There is one that is over to the left under the blue "buttons" that shows how many new threads have been created in that forum since your last visit.

There is the + sign that lets you create a new thread in that forum without having to enter into the forum and click on "new thread"

I like both of them... Is there anyway to make them not use up a query "slot" so that there aren't so many queries?

Admin 03-16-2002 07:52 AM

It's the first hack that gives you headache.

Admin 03-16-2002 07:54 AM

<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=34278&highlight=new+thr eads" target="_blank">https://vborg.vbsupport.ru/showt...ht=new+threads</a>
Post #16.

Gutspiller 03-18-2002 02:37 PM

Do you know if there is a way around this, or is that just how it works? If you could look into it and see if with all your |-|4X0|2 greatness you could modify the hack to use less queries if possible that would be really cool. Plus I think a lot of people would really like that hack if it didn't use so many queries.

Anyhow, thanks for all your info and I hope we can figure something out with this.


All times are GMT. The time now is 12:20 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.01165 seconds
  • Memory Usage 1,747KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (20)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