简体   繁体   中英

Entity Framework Remote SQL Server

I have 2 machines, one that have an SQL Server with all the data in it, and another one that has the client dashboard.

Both machines are not physically in the same location, so the Entity Framework queries are done over the internet.

The client can log in the "Client Dashboard" and download large size data (say 500MB in 1 query).

My question is, when the client downloads a 500 MB worth of rows (using Entity Framework C# to process this command), which machine out of these 2 will need to have better CPU/Memory power? The machine with the dashboard or the machine with the database?

I assume that, the machine with the SQL Server will need to have higher CPU/RAM that the one with just the client dashboard? or am I wrong?

which machine out of these 2 will need to have better CPU/Memory

Assuming the queries that are sent are simple, and don't require joins or sorting on SQL Server, SQL Server won't be heavily taxed.

The one downloading the 500MB data set, loading it into managed entities and doing stuff with it will require several GB of memory and will use lots of CPU.

SQL Server will fetch the data from disk and send it over the network without requiring lots of memory or CPU.

However, this

The client can log in the "Client Dashboard" and download large size data (say 500MB in 1 query).

Is generally considered bad design, as downloading and manipulating large datasets on the client will typically be very slow in addition to requiring large of amounts of memory and CPU. You would normally design the "Client Dashboard" to retrieve only small subsets or aggregates of the data at a time.

SQL Server will keep all your data in RAM if it has enough, and is built to provide very efficient query processing over large and complex data sets. And it's operating over local data, not having to fetch it from across the network.

And in that case the SQL Server might need to be bigger.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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