计算SQL连接传输成本

时间:2016-02-02 14:53:40

标签: mysql join cloud

我有这个SQL:

CREATE TABLE IF NOT EXISTS EMP (
EID varchar(4) NOT NULL PRIMARY KEY,
ENAME VARCHAR(40),
ESALARY DOUBLE,
DID VARCHAR(4));

CREATE TABLE IF NOT EXISTS DEP (
DID varchar(4) NOT NULL PRIMARY KEY,
DNAME VARCHAR(16),
DLOCATION VARCHAR(30));

SELECT * FROM EMP -> executed in T3 location
JOIN DID ON EMP.DID = DEP.DID;

EMP在节点T1上,DEP在节点T2上。

如果转移cost = size data,我该如何计算执行成本:

  1. 如果T1和T2在T3中传输,则EMP JOIN DEP为 发生?
  2. 如果DEP转移到T1 - > EMP JOIN DEP结果 调转T3?
  3. 如果EMP转移到T2 - > EMP JOIN DEP 结果转移到T3?

0 个答案:

没有答案