I have a database on Azure that is around 500mb, ~50 tables and a few tables with 100k+ records. A single table with ~1000k records. This is not a big database (around 20-50 DTU's). I have an ASP.NET MVC application that runs on top of this database.
When I run towards this database either from local or on my test/production environment, the database is extremely fast. My code is "solid production code" (indexes, paging), meaning I do not do anything crazy and this works on pretty heavy production loads.
However, when I import this database locally, it's VERY, VERY slow (pages takes 10-20 seconds to load, or simply fails). This results in I basically cannot run my application locally. Here is an example error I get (DK error message, but the typical error - see The wait operation timed out. ASP ) :
I experience the same problem when I run queries outside my main application. I am 99% sure this is a database problem, not an application problem because when I run scripts it's very slow too.
Any idea what the problem is? Why is my localhost so slow it cannot barely run normal queries?
This is how I created my local databae:
Save to local desktop:
I import into (localdb)\MSSQLLocalDB
:
Wait for this to happen and everything is confirmed. I then change my connection string to this database.