Performance comparison between mutliple tables and multiple databases

This is a discussion on Performance comparison between mutliple tables and multiple databases within the MySQL Database forums, part of the Database Forums category; What are the performance implications of storing some data across 2 databases instead of duplicating this data in both databases? ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-13-2007
davidjones@myself.com
 
Posts: n/a
Default Performance comparison between mutliple tables and multiple databases

What are the performance implications of storing some data across 2
databases instead of duplicating this data in both databases? ie. is
example 1 significantly slower than example 2:

Example 1:
SELECT Users.User.*, Transactions.Sales.date
FROM Users.User, Transactions.Sales
WHERE Users.User.id=Transactions.Sales.userid;

Example 2:
SELECT Users.User.*, Users.Sales.date
FROM Users.User, Users.Sales
WHERE Users.User.id=Users.Sales.userid;

Note in Example 2 the database Users would be significantly larger as
it has data duplicated from the database Transactions.

Thanks for any help.

Reply With Quote
  #2 (permalink)  
Old 09-13-2007
lark
 
Posts: n/a
Default Re: Performance comparison between mutliple tables and multiple databases

== Quote from davidjones ( davidjones@myself.com)'s article
> What are the performance implications of storing some data across 2
> databases instead of duplicating this data in both databases? ie. is
> example 1 significantly slower than example 2:
> Example 1:
> SELECT Users.User.*, Transactions.Sales.date
> FROM Users.User, Transactions.Sales
> WHERE Users.User.id=Transactions.Sales.userid;
> Example 2:
> SELECT Users.User.*, Users.Sales.date
> FROM Users.User, Users.Sales
> WHERE Users.User.id=Users.Sales.userid;
> Note in Example 2 the database Users would be significantly larger as
> it has data duplicated from the database Transactions.
> Thanks for any help.



there is really no certain way of telling which one will run faster since there
are many parameters that affect the results.

having said that, it is not hard to determine this on your own by looking at the
execution time and/or running either and/or both queries through an explain cmd.
further, you can turn on the slow query log and start looking at some of the
metrics in the slow query log. you can then make the best decision by looking at
metrics collected by your own server.

hope this helps.
--
POST BY: lark with PHP News Reader
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:28 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0