数据库项目需要很长时间才能打开

数据库项目需要很长时间才能打开

问题描述:

每当我打开包含多个数据库项目的 SLN 时,它都需要很长时间(10 到 15 分钟)才能打开.我收到的消息是:

Whenever I open my SLN that has multiple database projects under it, it takes a very long time (10 to 15 mintues) to open. The messages I get are:

Analyzing database schema. Your database projects will be ready after 23000 operations are completed.
Analyzing database schema. Your database projects will be ready after 45000 operations are completed.
Analyzing database schema. Your database projects will be ready after 59871 operations are completed.
Analyzing database schema. Your database projects will be ready after 63254 operations are completed.
Analyzing database schema. Your database projects will be ready after 87698 operations are completed.

Visual Studio 没有告诉我它正在分析什么?

Visual Studio does not give me an indication of what it is analyzing?

有什么办法可以加快这个过程吗?

Is there any way for me to speed up this process?

它正在序列化一个 DBMDL 文件.这需要很长时间,具体取决于项目的大小/复杂性.例如,我们的一个是 150MB,完成所有操作"需要将近 20 分钟.

It's serializing a DBMDL file. This takes quite a long time depending on the size/complexity of your project. One of ours is 150MB, for example and it takes almost 20 minutes to complete all of the "operations."

我建议每个解决方案有一个项目 - 它持续更新临时文件夹中的这些 DBMDL 文件,直到它们完成,然后将它们复制到您的工作文件夹,并可能导致相当多的磁盘活动.

I would recommend having one project per solution - it continually updates these DBMDL files in your Temp folder until they are finished, then copies them to your working folder and can cause quite a bit of disk activity.

我还将了解如何优化这些 - 在某些情况下,它所花费的时间确实是一个障碍.

I'm also going to see about optimizing these - the amount of time it takes is really a roadblock in some cases.