Coder Social home page Coder Social logo

tddl's Introduction

tddl

Taobao Distributed Data Layer

tddl's People

Contributors

hhhcommon avatar

Stargazers

 avatar Andy avatar 许广辉 avatar  avatar Zongbin Tu avatar  avatar WTF avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tddl's Issues

广播表和分库分表查询问题

广播表a,分库不分表 tb_goods 拆分字段 member_id
数据库 icdb0,icdb1
icdb0 表 广播表 a
image
表 tb_goods
image

icdb1 表 tb_goods
image

explain
select * from a,tb_goods as b where a.id=b.id and b.member_id=35

+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+
| GROUP_NAME | SQL | PARAMS |
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+
| MYSQL_ICDB_01 | Join
leftColumns:[A.ID]
rightColumns:[B.MEMBER_ID]
type:inner join
strategy:NEST_LOOP_JOIN
executeOn:MYSQL_ICDB_01
left:
Query from A as A
tableName:a
executeOn:MYSQL_ICDB_00
right:
Query from TB_GOODS as B
resultFilter:TB_GOODS.MEMBER_ID = 35
tableName:tb_goods
executeOn:MYSQL_ICDB_01
| NULL |
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+
1 row in set (0.19 sec)

理论上应该 下推到 MYSQL_ICDB_01
执行 sql的,怎么会在 icdb0上查询a ,在icdb1上查询tb_goods, 然后再在tddl上join的呢

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.