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? ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. |
|
|||
|
== 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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|