vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin.org Site Feedback (https://vborg.vbsupport.ru/forumdisplay.php?f=7)
-   -   Runs/Adds Queries (https://vborg.vbsupport.ru/showthread.php?t=98766)

Snake 10-19-2005 10:28 AM

Runs/Adds Queries
 
Hey there's just a little option that you're missing, Runs/Adds Queries, to the right column. It's good to know whether a hack requires to run or add a query, you know.

Supported
DB Changes
Installer included
Uses Plugins
Template changes
Code changes
Additional files
Adds query
Is in Beta stage

Chris M 10-19-2005 01:22 PM

That's what DB Changes is for ;)

Chris

Alan @ CIT 10-19-2005 02:41 PM

Why would you want to know if a hack has SQL queries in it?

peterska2 10-19-2005 03:13 PM

I suppose some people don't like things that need extra queries. Seems to limit them to template mods only then, IMO, as I believe most mods require some form of query or other.

Chris M 10-19-2005 03:35 PM

DB Changes does not necessarily mean that queries will be ran when executing the Plugin on a day-to-day basis; It could mean that simply a few queries will be ran when installing / un-installing products ;)

Chris

peterska2 10-19-2005 03:44 PM

Hence why I think it should be two seperate things, ie, uses queries when installing, and uses queries on a day-to-day basis.

Chris M 10-19-2005 03:48 PM

This won't happen until we move to 3.5, by which point you will be able to define multiple combinations of what your modification does and no longer be confined to guesswork as far as what you select :)

Chris

peterska2 10-19-2005 03:52 PM

Cool. I'm looking forward to this hacks database, it's gonna be ace.

Chris M 10-19-2005 03:56 PM

It even comes with a scrolling marquee saying [high]Chris M is the greatest[/high] :)

Chris

peterska2 10-19-2005 04:01 PM

now I've gone off the idea!!!!

Xenon 10-19-2005 04:13 PM

Quote:

Originally Posted by peterska2
now I've gone off the idea!!!!

perfect, less work again :)

Andreas 10-19-2005 04:21 PM

DB Changes = The Hacks modifies the database schema (eg. adding new fields, tables, indexes, etc.)
It has nothing to do with queries it uses to do it's work (gather data to display or whatever).

Corriewf 10-19-2005 04:23 PM

Quote:

Originally Posted by Chris M
It even comes with a scrolling marquee saying [high]Chris M is the greatest[/high] :)

Chris


Lies it spreads...LIES!

Alan @ CIT 10-19-2005 04:32 PM

I've never understood this obsession with hacks and their SQL queries.

Merging 4 threads and moving the merged thread to a different forum using inline moderation, runs 102 queries - why would you care if a hack adds a query or 2 that take a fraction of a second to run?

But... that's just me :)

kall 10-19-2005 07:55 PM

Quote:

Originally Posted by peterska2
Cool. I'm looking forward to this hacks database, it's gonna be ace.

It's going to be ... me?

Oh... right. :)

Chris M 10-19-2005 08:00 PM

Quote:

Originally Posted by Alan @ CIT
I've never understood this obsession with hacks and their SQL queries.

Merging 4 threads and moving the merged thread to a different forum using inline moderation, runs 102 queries - why would you care if a hack adds a query or 2 that take a fraction of a second to run?

But... that's just me :)

The only time that could become a concern is with a badly scripted modification that runs excessive queries...

And since the days of 3.0 and especially 3.5 you don't need to execute as many queries thanks to improvements in functionality ;)

Chris

Snake 10-19-2005 09:56 PM

Oh I'm glad to hear this will be available while we're on 3.5. :)

Lea Verou 11-18-2005 07:10 PM

Ι remember asking about queries when I didn't even know what a query was! I don't think that everyone that seems so concerned about them really knows how much they add and what a query actually means.
I think some people are obsessed with the number of queries for no reason.
Anyway, DB changes is not complete cause there are hacks that don't affect the database but only run queries to read from it. So a query field is needed since we have those does-it-run-queries maniacs :p :p

noppid 11-18-2005 07:16 PM

It's not necessarilly the number of queries, but the quality of the queries. One badly written or implemented query can be worse then 100 properly implemented queries.

Lea Verou 11-18-2005 07:18 PM

Quote:

Originally Posted by noppid
It's not necessarilly the number of queries, but the quality of the queries. One badly written or implemented query can be worse then 100 properly implemented queries.

And how do you define a badly written query? :confused:

noppid 11-18-2005 07:19 PM

Quote:

Originally Posted by Michelle
And how do you define a badly written query? :confused:

A query that has to do a table scan of records rather then use indexed lookups.

Lea Verou 11-18-2005 07:22 PM

Quote:

Originally Posted by noppid
A query that has to do a table scan of records rather then use indexed lookups.

Hmm I'm not sure what you mean (I'm new to all this) but using indexed lookups is not always possible I think!

noppid 11-18-2005 07:31 PM

Quote:

Originally Posted by Michelle
Hmm I'm not sure what you mean (I'm new to all this) but using indexed lookups is not always possible I think!

You should design your tables in advance to accomodate using indexes. On small tables you can cheat. On large tables you can get in trouble. (50Kplus records)

Lea Verou 11-18-2005 08:04 PM

Quote:

Originally Posted by noppid
You should design your tables in advance to accomodate using indexes. On small tables you can cheat. On large tables you can get in trouble. (50Kplus records)

I don't understand :(
Can you please take a look at my referrer statistics hack and tell me what do you think about the queries? :nervous:
Please? :nervous:

Wayne Luke 11-18-2005 08:33 PM

Quote:

Originally Posted by Michelle
I don't understand :(
Can you please take a look at my referrer statistics hack and tell me what do you think about the queries? :nervous:
Please? :nervous:

You should recommend placing an index on referrerid for your queries to work better and not result in table scans.
Code:

ALTER  TABLE  `user`  ADD  INDEX (  `referrerid`  )
As the user table is actually very rarely updated, at least compared to other tables, the additional index will decrease the overhead of your hack and not increase the creation or editing times of users substantially.

Read this article for more information:
http://www.databasejournal.com/featu...0897_1382791_2

Even though your hack only has two queries, it completes two table scans. Table Scans are bad because it copies the entire table into memory and locks it until completed. This means no one's records can be updated or created while it is locked. On a small forum this may take milliseconds as MySQL looks at every record to see if it matches. On large forums it can take several seconds.

Paul M 11-18-2005 11:18 PM

Most poeple have little idea how sql works, and how useful indexes are, that is why they are obsessed with hacks running "queries". A few simple reads on a well indexed table can take less than 100th of a second to run. Lots of people add fields to tables, but never think about indexes.

Back to the topic, A tick box for Runs/Adds queries is IMO pointless, anything except the most simple of hacks will almost certainly run at least one query. I would not waste my time filling it in.

Alfa1 06-10-2007 01:43 PM

Would there be another way of defining sever load for a mod? It would be good to know this before installing a hack. Maybe the number of queries or maybe there is another approach?
Myself I like a lot of hacks on vb.org, but installing to many may cause problems I suspect. I would appreciate your view in this.


All times are GMT. The time now is 04:01 AM.

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.01161 seconds
  • Memory Usage 1,774KB
  • 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
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (27)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