MySQL join with federated view not working -
i want bring together table view, 1 table l
local, whereas view f
federated
view residing on server:
select * l left bring together f on l.id = f.id;
now bring together results in no hits despite fact there many matches between table , view. id field bigint
.
frustrated, created temporary
table t
, dumped f
it, making local re-create of f
. using t
instead of f
, bring together works expected. process of creating t
consumes memory , time.
what possible reasons odd mysql behaviour?
table definitions:
create table `l` ( `id` bigint(20) not null, `id2` bigint(20) not null, primary key (`id`,`id2`) ) engine=innodb default charset=utf8;
and (this table in fact view on remote server):
create table `f` ( `id` bigint(20) not null auto_increment, `field1` bigint(20) not null, ... `field5` tinyint(1) default null, primary key (`id`) ) engine=federated default charset=latin1 connection='mysql://username:pword...';
as states definition of federated
storage-engine is, must have table construction definition (so, illustration .frm
files myisam) on both servers. because how federated
engine works:
therefore, can not utilize view
since has different meaning , structure. instead should mirror table , you'll able utilize in queries.
mysql join federated-table
No comments:
Post a Comment