The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
My co-developer and I are working on using 2 mySQL databases for vB - to lighten the load on attachments. We've run into some teething problems replicating the $DB_site-> function ($DB_attach->)
Is it possible to use 2 databases at once? Is it known to cause problems? Should we close the connections to 1 db before quering the other? Thanks for any help. |
#2
|
||||
|
||||
![]()
If you are using the same user/pass for the two databases, it's really simple actually.
![]() All you need to do, is first move the attachment table from one db to the other. Then, find all places where you have SELECT [...] FROM attachment, and change that to newDBname.attachment (also do that for JOINs with the attachment table). The places I can currently think about are: showthread.php (where you select the posts there should be a reference there to that table) attachment.php (duh) functions.php (acceptupload() is the function that actually adds the files to the database...) Good luck. ![]() |
#3
|
||||
|
||||
![]()
(And if you don't have the same user/pass for the databases, first yell at your host for being dense, then... I don't know.
![]() |
#4
|
||||
|
||||
![]()
The problem is it's not on the same server. 2 different databases on 2 different servers. So if i'm not mistaken your solution would only help if the 2 db's are on the same server?
Thanks |
#5
|
||||
|
||||
![]()
Yup... heh I was wondering how it would help to have two databases on the same servers rather than one.
![]() In that case, just copy the code from global.php that starts $DB_site, and duplicate it using $DB_attach... then use that new object when selecting stuff from attachment table, although you will have problems with JOINs. |
#6
|
||||
|
||||
![]()
Yeah - we're looking at re-writting these queries now, which I am guessing will make it less effcient - but we'll see when we get there.
![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|