简体   繁体   English

企业库5.0-DatabaseFactory.CreateDatabase()-性能低下

[英]Enterprise Library 5.0 - DatabaseFactory.CreateDatabase() - Slow performance

Im using Enterprise Library 5.0 Data Access block. 我正在使用企业库5.0数据访问块。 the Creation of a databaseinstance is really slow. 创建数据库实例确实很慢。 DatabaseFactory.CreateDatabase() statement consumes a lot of time when connecting to SQL Server 连接到SQL Server时,DatabaseFactory.CreateDatabase()语句消耗大量时间

  1. What are the best practices for high performance Enterprise library DAAB DB creation 高性能企业库DAAB DB创建的最佳实践是什么
  2. Can I Create a object pooling mechanism and reuse the Objects rather than creating it again and again. 我可以创建一个对象池机制并重用对象,而不是一次又一次地创建它。 Will this create any concurrency problems? 这会引起并发问题吗?

DatabaseFactory.CreateDatabase doesn't connect to the database server at all; DatabaseFactory.CreateDatabase根本不连接到数据库服务器。 if it's slow, something else is going on. 如果速度很慢,则说明正在发生其他情况。 The only external thing it should be hitting is the configuration file, and that should only happen on the first request. 它应该被击中的唯一外部事物是配置文件,并且仅应在第一个请求上发生。

Where is your configuration (disk? network share? database? other?)? 您的配置在哪里(磁盘,网络共享,数据库或其他?)?

Also - how do you define "really slow"? 另外-您如何定义“真的很慢”? Can you post a sample that demonstrates the problem? 您可以发布一个演示问题的示例吗?

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

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