设想如下:
Master机器利用FEDERATED引擎映射4台分服务器上同类型的表。在Master机器上用如下语句:
select XXX from FEDERATED_1 where XXX
union all
select XXX from FEDERATED_2 where XXX
union all
select XXX from FEDERATED_3 where XXX
union all
select XXX from FEDERATED_4 where XXX想要了解的是,上面这句sql是在分服务器_1执行完再到分服务器_2执行,以此类推?还是各台分服务器并发执行相应的select,然后各自返回后union all?顺道问下FEDERATED引擎稳定性如何?会不会有莫名其妙的状况出现?(我目前没发现,各位有生产环境的经验最好)
Master机器利用FEDERATED引擎映射4台分服务器上同类型的表。在Master机器上用如下语句:
select XXX from FEDERATED_1 where XXX
union all
select XXX from FEDERATED_2 where XXX
union all
select XXX from FEDERATED_3 where XXX
union all
select XXX from FEDERATED_4 where XXX想要了解的是,上面这句sql是在分服务器_1执行完再到分服务器_2执行,以此类推?还是各台分服务器并发执行相应的select,然后各自返回后union all?顺道问下FEDERATED引擎稳定性如何?会不会有莫名其妙的状况出现?(我目前没发现,各位有生产环境的经验最好)
When a client issues an SQL statement that refers to a FEDERATED table, the flow of information between the local server (where the SQL statement is executed) and the remote server (where the data is physically stored) is as follows: The storage engine looks through each column that the FEDERATED table has and constructs an appropriate SQL statement that refers to the remote table. The statement is sent to the remote server using the MySQL client API. The remote server processes the statement and the local server retrieves any result that the statement produces (an affected-rows count or a result set). If the statement produces a result set, each column is converted to internal storage engine format that the FEDERATED engine expects and can use to display the result to the client that issued the original statement.