vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   MySQL 5 View + VB Users Table (https://vborg.vbsupport.ru/showthread.php?t=163806)

inxil 11-28-2007 04:26 PM

MySQL 5 View + VB Users Table
 
Moved from http://www.vbulletin.com/forum/showthread.php?t=250284 as suggested by vB team.

So let me just say first that I'm running VB 3.5.2 so if pluggable authentication has been added since that version, sorry for this post. Essentially I need to have VB authenticate against an existing users database. Currently, I'm using plugins to sync the data each time someone logs in, but that's not an ideal strategy. I'm upgrading VB and my server, and was thinking about moving to MySQL 5. One interesting thing about MySQL 5 is that it now supports views. So I was thinking about creating a special vb_user_addl table that holds all the VB-specific data, and then creating a VIEW that joins the data from my users table with the data from the vb_user_addl table (and makes all necessary changes to the column names).

Now while I'm pretty sure I could make this work, I'm not sure about the performance issues. Has anyone tried this? Any tips? Any thoughts on a better solution?

Thanks!

Eikinskjaldi 11-28-2007 08:59 PM

If the issue is one of syncing then you would be better off with a trigger than you would with a view.

I assume you have some fields in a vb table that need to be changed when an orthologous field in another table is updated? That's what triggers are for.


All times are GMT. The time now is 01:45 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.01528 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
  • (2)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