Enterprise Library 5.0 - DatabaseFactory.CreateDatabase() - 性能缓慢
我正在使用 Enterprise Library 5.0 数据访问块。数据库实例的创建非常慢。连接到 SQL Server 时 DatabaseFactory.CreateDatabase() 语句消耗大量时间
- 高性能企业库 DAAB DB 创建的最佳实践是什么
- 我可以创建一个对象池机制并重用对象,而不是一次又一次地创建它。这会产生任何并发问题吗?
Im using Enterprise Library 5.0 Data Access block. the Creation of a databaseinstance is really slow. DatabaseFactory.CreateDatabase() statement consumes a lot of time when connecting to SQL Server
- What are the best practices for high performance Enterprise library DAAB DB creation
- Can I Create a object pooling mechanism and reuse the Objects rather than creating it again and again. Will this create any concurrency problems?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
DatabaseFactory.CreateDatabase根本不连接到数据库服务器;如果速度很慢,则说明发生了其他事情。它应该命中的唯一外部事物是配置文件,并且这只应该在第一个请求时发生。
您的配置在哪里(磁盘?网络共享?数据库?其他?)?
另外 - 你如何定义“非常慢”?您可以发布一个演示该问题的示例吗?
DatabaseFactory.CreateDatabase doesn't connect to the database server at all; 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?