Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
  #1  
Old 19 Oct 2006, 20:14
psico psico is offline
 
Join Date: Oct 2001
Real name: Ismael Briasco
Slave Server --> Search ONLY

I want to hack my vb 3.6.1 to send only searches to the Slave server, because when someone makes a complex search, the POST table on the slave get locked and all the queries to the POST table are locked until the search finish... Thatīs why I need to send ONLY searchs to the SLAVE DB...

Anyone know how to do that?

Tnx a lot in advance and sorry for my bad english!

Psico.
Reply With Quote
Comments
  #2  
Old 25 Oct 2006, 17:35
COBRAws's Avatar
COBRAws COBRAws is offline
 
Join Date: Oct 2002
Real name: Jack
Originally Posted by psico
I want to hack my vb 3.6.1 to send only searches to the Slave server, because when someone makes a complex search, the POST table on the slave get locked and all the queries to the POST table are locked until the search finish... Thatīs why I need to send ONLY searchs to the SLAVE DB...

Anyone know how to do that?

Tnx a lot in advance and sorry for my bad english!

Psico.
Hello psico,

Let me see if I understand you question. You want all your searches be sent to your slave DB and not the primary, is that right? If so, its quite simple, I use the following for my NightClubber website


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


The problem is, that with this code edit, your primary database will replicate into the slave database. Im not quite sure how to replicate only the necesary tables.
__________________
cobraws
Reply With Quote
  #3  
Old 26 Oct 2006, 13:12
ALanJay ALanJay is offline
 
Join Date: Jun 2002
You might want to take a look at this thread http://www.vbulletin.org/forum/showthread.php?t=127868 which is about creating a separate search engine.
Reply With Quote
  #4  
Old 29 Oct 2006, 16:33
TosaInu's Avatar
TosaInu TosaInu is offline
 
Join Date: Jul 2004
Hello,

Some hosts auto prefixes the database made with the username. So say, I have 2 domains (on two different boxes). Then I make a masterdatabase called forum at domain1, but that's called domain1_forum, I can call the slavedatabase on the other domain (different serverbox) forum too. But as it's on domain2, it's automatically called domain2_forum.

What to do in such cases?

(Talking about shared and partially dedicated hosting).
__________________
Ja mata
TosaInu
Reply With Quote
  #5  
Old 29 Oct 2006, 19:05
COBRAws's Avatar
COBRAws COBRAws is offline
 
Join Date: Oct 2002
Real name: Jack
Originally Posted by TosaInu
Hello,

Some hosts auto prefixes the database made with the username. So say, I have 2 domains (on two different boxes). Then I make a masterdatabase called forum at domain1, but that's called domain1_forum, I can call the slavedatabase on the other domain (different serverbox) forum too. But as it's on domain2, it's automatically called domain2_forum.

What to do in such cases?

(Talking about shared and partially dedicated hosting).
AS far as vB is coded, there is no way to do what you ask because both databases need the same table prefix.

BUT, if you own the 2 boxes, you can always log in as root and set up a new database without a prefix. Or, better the case, add a new prefix matching your box1's prefix.

If you really cant make the slave database name mirror the name of the master DB, you should submit a ticket to vBulletin Support Staff, but actually they will tell you the same thing I did. Maybe you should contact a vB coder and ask for this edit.


Cya!
__________________
cobraws
Reply With Quote
  #6  
Old 02 Nov 2006, 04:31
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
In search.php, I modify the search queries to point to the slave database server. You only need to replicate user, forum, post and thread on the slave search database.
Reply With Quote
  #7  
Old 02 Nov 2006, 05:16
COBRAws's Avatar
COBRAws COBRAws is offline
 
Join Date: Oct 2002
Real name: Jack
Originally Posted by Erwin
In search.php, I modify the search queries to point to the slave database server. You only need to replicate user, forum, post and thread on the slave search database.
but when you fill in the slave DB server details into the config.php, doesnt vB automatically replicate the whole DB into the slave? I thought it was like this.

thanks for the tips Erwin
__________________
cobraws
Reply With Quote
  #8  
Old 21 Mar 2007, 03:50
alexi alexi is offline
 
Join Date: Feb 2002
Originally Posted by Erwin View Post
In search.php, I modify the search queries to point to the slave database server. You only need to replicate user, forum, post and thread on the slave search database.

Erwin, could you go into a little more detail on how you did this? Or better yet make a hack?
Reply With Quote
  #9  
Old 29 Mar 2007, 16:43
jason|xoxide jason|xoxide is offline
 
Join Date: Aug 2006
Real name: Jason Litka
Originally Posted by COBRAws View Post
but when you fill in the slave DB server details into the config.php, doesnt vB automatically replicate the whole DB into the slave? I thought it was like this.

thanks for the tips Erwin
vBulletin does NOT replicate any of your data for you. If you don't already have a replicating pair setup, you shouldn't fill in the slave server details.

Configuring MySQL Replication:
http://dev.mysql.com/doc/refman/5.0/...ion-howto.html
__________________
[font="Verdana"]Jason Litka
Utter Ramblings
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 06:48.

Layout Options | Width: Wide Color: