Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8215949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:57:38+00:00 2026-06-07T11:57:38+00:00

I am currently building a web application that will be using two databases at

  • 0

I am currently building a web application that will be using two databases at the same time. The user first creates a general account and afterwards uses it to create multiple characters on multiple ‘servers’. (think of it as creating an account on Facebook and then using it to sign up on other websites).

My current database setup is the following:

  • main_english
  • main_russian
  • server1
  • server2
  • server3

The main_english and main_russian databases contain the session and general account data for users who’ve registered at the appropriate languages.

The server1 and server2 databases handle the created character data of the English users, while server3 handles the Russian ones.

Users will be updating tables every 5-10 seconds or so. My question is, how could I efficiently handle having several DBs used?

So far I’ve come to several options:

  1. Open two DB connections: one for main_ and another for server,
    but I’ve read that opening them is fairly expensive.
  2. Modifying all
    my queries to explicitly state which DB to update/select data from
    (the project is still young and thus it wouldn’t be that
    painful)
  3. Modifying my $db class to have select_db() statements
    with each query, which, in my opinion, is both messy and
    inefficient.

What could you suggest? Perhaps I am overreacting about opening a second connection for the server queries?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T11:57:40+00:00Added an answer on June 7, 2026 at 11:57 am

    MySQL is known to have fast connection handling so thats unlikely to be a bottleneck. That being said you could look into persistent connections in the PDO or mysqli extensions.

    In terms of the server access and data modeling its difficult to say without knowing more about your application. How do DB slaves factor in? Is replication lag OK?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently building a web application that has multiple user types, where users engage
I'm currently building an application where the user will generate data over time and,
I am building a web application that is currently PHP with MySQL. There is
I'm currently building a web form using APEX that is losely modelled after a
I am currently building a small web application for publishing stories using PHP and
I am currently creating a web application that will be deployed in an intranet
I'm currently building an web application for a customer that uses a rich client.
I'm currently building a web app that will take some info from a database
I'm currently building a simple web application in PHP that other company's can use
I'm currently building a web application using Zend framework 1.11.11 and Doctrine 2.2. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.