vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Questions about query_read() vs. query_read_slave() (https://vborg.vbsupport.ru/showthread.php?t=244415)

RagedGamers 06-11-2010 03:20 PM

Questions about query_read() vs. query_read_slave()
 
I'm developing a plugin with a lot of SQL reads and I'd like to optimize it as much as possible. One optimization I'd like like to look into is switching all of my query_read functions to query_read_slave functions.

I've read that query_read_slave() should be used when timing is not vital (source).
  • Is there a performance increase even when there's no slave DB?
  • What are some examples of situations where timing would be vital vs. not vital?

I've also read that "you only use query_read_slave when you have more than 1 query running together" (source).
  • Is this true? If so, can somebody explain this further?

If you guys can answer some of these questions, I would be very grateful. :)

Marco van Herwaarden 06-12-2010 07:43 AM

If there is no slave database, there should be no increase or descrease in performance.

Displaying the result of a search is for example not considered critical, reading the permissions of a user in order to determine if the post he is making is allowed might be critical.

RagedGamers 06-14-2010 02:21 AM

Alrighty. Thanks for clearing that up!


All times are GMT. The time now is 07:30 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.01163 seconds
  • Memory Usage 1,711KB
  • 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
  • (3)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