Jump to content

Multiple Databases


guitarclap

Recommended Posts

Two questions:

1. Does the # of tables in a db affect the performance?
2. Is it possible to "replicate" or "link" tables from 1 db to another?...

[table]
[tr]
[td][b]DB: core[/b][/td]
[td][b]DB: app1[/b][/td]
[td][b]DB: app2[/b][/td]
[/tr]
[tr]
[td]Table: users (id,username)[/td]
[td]Table: albums (id,user_id,name)[/td]
[td]Table: messages (id,user_id,name)[/td]
[/tr]
[/table]

Is there any way to setup mysql to "link" from core.users so the table is also available in app1 and app2 db?  I see there is replication but I am not sure that is what I want and that takes a lot of configuration.

USE app1;
SELECT * FROM albums LEFT JOIN users ON (users.id=albums.user_id)

or will it always have to be

SELECT * FROM app1.albums LEFT JOIN core.users ON (core.users.id=app1.albums.user_id)
Link to comment
Share on other sites

Well we want to create 4 completely different sites but all need to feed off of the same user/profiles/accounts/etc tables.  I asked #1 question how many tables can 1 db have before performance starts being an issue?  My first option was to just prefix the tables to help with organization but I wonder if say 200 tables is better than 4 databases with 50 each.



Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.