• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 340
  • Last Modified:

Mysql using multiple databases

I am looking at parts of my application to access data from two separate databases.

I am just wondering what sort of resources this uses as I am trying to understand it better.

There is only a small amount of data in the other database it needs to access.  For system performance am I better to put the table and data into the one database?  I would prefer not to double up the same data into two databases if I can, but am interested in the performance side, especially if I have a large number of users on this, as hoped.

I would appreciate advice from an expert on this.
0
debbieau1
Asked:
debbieau1
  • 2
1 Solution
 
DanielleFavreauCommented:
I'm not an expert on here but do run hundreds of MySQL databases in various environments and have encountered this situation several times with client sites that I work on.

A.
If separate parts of your application will access the databases independently (e.g. Page A only interacts with Database A and Page B only interacts with Database B) then you should be fine.

B.
If a single part of your application needs to simultaneously query both databases and display data from both databases then you're best to import the table(s) from Database B into Database A and use joins (if necessary) to pull that data together into your application so it only has to query a single database.

Querying two separate databases to populate a single document/page/view will take slightly more time, and it may not be noticeable initially, but may impact performance if this is a heavily queried document/page/view.
0
 
debbieau1Author Commented:
Thanks
0
 
DanielleFavreauCommented:
You're welcome.  Thank you for taking the time to review my answer.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now