Skip to content
lightfish edited this page Nov 29, 2020 · 11 revisions

注解用法

查询:

  • /*!mycat:dataNode = dn1 */ SELECT * FROM cont
  • /*!mycat:dataNode = dn1 */ SELECT * FROM cont

插入:

  • /*!mycat:dataNode = dn1 */ insert INTO cont (taobaoId,name) VALUES (111,'db1')
  • /*!mycat:dataNode = dn2 */ insert INTO cont (taobaoId,name) VALUES (111,'db2')
  • /*!mycat:dataNode = dn3 */ insert INTO cont (taobaoId,name) VALUES (111,'db3')

查询

  • /*!mycat:schema = TESTDB */ SELECT * FROM cont;

Catlet使用

  • /*!mycat:catlet=io.mycat.catlets.ShareJoin */ select * from cont db1 join cont db2 on b.id=a.days order by a.id;