Replies: 1 comment 3 replies
-
UsrAdoConnectionPool(true) 因为要测试连接是否正常,首次创建 DbConnection 可能会执行一次。 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
连接字符串 为:server=xx;database=xx;uid=sa;pwd=xxx;Pooling=true;Min Pool Size=10;Encrypt=false;TrustServerCertificate=true
FREESQL对象:
freeSql = new FreeSqlBuilder()
.UseConnectionString(DataType.SqlServer, SqlConnectionString, typeof(FreeSql.SqlServer.SqlServerProvider<>))
.UseAutoSyncStructure(false)
.Build();
连接池为10个,现状是,每一次访问数据库时,都会发出10个(最小连接池的数量)的select 1执行。
大量select 1不是定时测试产生的,是随着业务调用才发起的。
如果业务上需要执行10次SQL语句,则会产生100(10次业务连接*10个最小连接池)的select 1.
我的业务在局域网内,请问如何优化这个操作
Beta Was this translation helpful? Give feedback.
All reactions