MySQL Forums
Forum List  »  Performance

Re: One big DB or two not-too-big DBs? FKs across DBs are slower?
Posted by: Arjen Lentz
Date: April 06, 2008 04:19AM

Sebastián Gómez Wrote:
> in terms of performance, is it better have two? or one?
> note: even in the 2-db-way, it would be FK's
> between tables, so, another question would be:
> FKs across databases (db1.table1 has a FK of
> db2.table1) are slower than the ones within a
> single database?

Very short and simple answer: it makes absolutely no difference in MySQL, it will be just as fast.

I often advise people use multiple dbs in an app, if it makes sense in terms of for instance access control - since it's much easier to manage grants on database level than on table level (imagine adding/renaming a table, etc).

Regards, Arjen.
Arjen Lentz, Exec.Director @ Open Query (
Remote expertise & maintenance for MySQL/MariaDB server environments.

Follow us at &

Edited 1 time(s). Last edit at 04/06/2008 04:21AM by Arjen Lentz.

Options: ReplyQuote

Written By
Re: One big DB or two not-too-big DBs? FKs across DBs are slower?
April 06, 2008 04:19AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.