![]() |
How Big Is 1 Query?
I noticed a lot of people make a big deal over queries and I'm wondering if I should be making a big deal too.
How much space/time/whatever does your average query load? |
A query basically means that your database has to be accessed in order to get data.
Too many queries or one badly written query could mean a slow down of your site due to an increased server load due to increased CPU usage and/or hard disk read/writes. It all depends on the query, the number of them and the size of the database/ table being accessed. |
Quote:
You'll notice, for instance that at the bottom of vBulletin.org's pages they've got something showing the load. This page tells me: Page generated in 0.16971 seconds with 15 queries. This tells me that the queries were fairly light and that the CPU this thing is running on is fairly good! - Sid |
Quote:
|
Quote:
What is SQL? Quote:
Here is a good place to get started if you want to learn more about SQL: http://sqlcourse.com/intro.html |
I'd often wondered the same thing actually, thanks for sharing guys. :)
|
The big issue over quarys is due to multiple hacking.
Say you have 10 hacks on showthread, and all the hacks add 1 quary, then you risk slowing down your server. So when a quary can be removed, and data retrieved with out the quary then it is the best option. It is not that 1 quary is bad, it is that they add up, and due to that everyone trys not to have any. |
Quote:
Again, it depends on how the SQL is written, and more importantly how the database itself is layed out plus many of factors. It's all trail and error :) |
Yes, but I was explaining why alot try not to add any quarys ;)
If you look thru posts people always say can't you do this with out a quary? personally I do not mind one extra quary here and there if it is not massive. But if I was to release something I would use as few as possible :) It is like file edits, one line of file edit hurts nothing, but it is so much more liked if can do it with out an edit. |
Quote:
10 querys could be lighter than 5 querys Its all about trial and error, some times querys are nessary, some times they arn't. Indies also help alot. and its query ;) not quary |
All times are GMT. The time now is 12:27 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|