Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 959 Bytes

3.8_Hint.md

File metadata and controls

28 lines (18 loc) · 959 Bytes

3.8 Hint

3.8.1 Syntax

/* { ! | #}dble: {sql=SELECT select_expr FROM table_references WHERE where_condition

                          |schema=schema_name

                          |datanode=datanode_name

                          |db_type={slave|master}}

*/ ordinary_sql

3.8.2 举例

/*!dble:sql=select 1 from sbtest */ call p_show_time();
/*!dble:schema=testdb */ call p_show_time();
/*!dble:datanode=dn1*/ update sbtest set name = 'test';
/*!dble:db_type=master*/ select count(*) from sbtest;
/*#dble:sql=select 1 from sbtest */ call p_show_time();
/*#dble:schema=testdb */ call p_show_time();
/*#dble:datanode=dn1*/ update sbtest set name = 'test';
/*#dble:db_type=master*/ select count(*) from sbtest;