Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解析条件上下文性能提升 #65

Closed
jiang2015 opened this issue May 10, 2016 · 0 comments
Closed

解析条件上下文性能提升 #65

jiang2015 opened this issue May 10, 2016 · 0 comments

Comments

@jiang2015
Copy link
Contributor

方法1: public void addCondition(final SQLExpr expr, final BinaryOperator operator, final List valueExprList, final DatabaseType databaseType, final List parameters)
方法2:
public void addCondition(final String columnName, final String tableName, final BinaryOperator operator, final SQLExpr valueExpr, final DatabaseType databaseType, final List parameters)
添加条件的逻辑:
在insert场合,应该先判断shardingColumns.contains(columnName) 如果不是shardingcolumn,不用去做evalExpression(databaseType, valueExpr, parameters)操作。

现在逻辑:先做evalExpression(databaseType, valueExpr, parameters)操作,然后在判断shardingColumns.contains(columnName)。
这样性能上会有影响。
建议修改一下代码。

@terrymanu terrymanu changed the title 关于ParseContext addcondition 逻辑问题 [Bug] 解析条件上下文性能提升 May 10, 2016
@terrymanu terrymanu changed the title [Bug] 解析条件上下文性能提升 解析条件上下文性能提升 Jul 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants