guitarclap Posted November 17, 2006 Share Posted November 17, 2006 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 beSELECT * FROM app1.albums LEFT JOIN core.users ON (core.users.id=app1.albums.user_id) Quote Link to comment Share on other sites More sharing options...
printf Posted November 17, 2006 Share Posted November 17, 2006 It will have to be last example, but even that depends on exactly what you are doing. My question would be, why the (3) databases, instead of (1).printf Quote Link to comment Share on other sites More sharing options...
guitarclap Posted November 18, 2006 Author Share Posted November 18, 2006 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. Quote Link to comment Share on other sites More sharing options...
fenway Posted November 18, 2006 Share Posted November 18, 2006 More databases is worse.... keep them all together. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.