On Wed, 2008-04-02 at 21:34 +0100, Ben Roberts wrote: > Hello, > > Does anybody have any info on cross-database joins? > > i.e. doing a join across various tables that are located inside > different databases (albeit on the same database server). > > I'm interesested in any potential pitfalls, limitations, and performance > issues. There doesn't appear to be much information about this on the > web (at least not that I can find so far).
As far as I can tell, this is exactly the same as querying tables in the same database. > Does querying multiple databases in a single query count as multiple > connections? No. > I'm using the InnoDB engine. Do foreign key constraints work across > different databases too? I've never tried that. If there is such a relationship, it would tend to suggest that the tables should be in the *same* database anyway. But you can try it and see. > Is using cross-database joins considered good practice? If separating tables into different databases makes things easier for you, then ( at least with MySQL ), I don't see any problems. -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]