简体   繁体   English

System.Data.DbType 与 System.Data.SqlType

[英]System.Data.DbType Vs System.Data.SqlType

Am using enterprise library data access application block... is there any performance impact of using System.Data.DbType Vs System.Data.SqlType ?正在使用企业库数据访问应用程序块...使用System.Data.DbType Vs System.Data.SqlType对性能有影响吗?

And also, would like to know performance impact for the statement:而且,想知道语句对性能的影响:

DatabaseFactory.CreateDatabase("MyDB") 

Vs VS

new SqlDatabase(myConnectionString);

The impact here is not one of performance but more explicitness versus flexibility.这里的影响不是性能之一,而是更明确而不是灵活性。 the DBType and DatabaseFactory methods are more flexible and allow you to flip the type of database you are using. DBType 和 DatabaseFactory 方法更灵活,允许您翻转正在使用的数据库类型。 You might see a small bit of perf in the other direction, but not enough to make your decision based on perf.您可能会在另一个方向看到一点性能,但不足以根据性能做出决定。

Any performance difference will be neglible (especially compared with database accesses).任何性能差异都可以忽略不计(尤其是与数据库访问相比)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM