Tag Info

New answers tagged


As a general rule of thumb, you should give the database as much information as possible about the task that you're implementing, as modern databases (especially commercial ones) are incredibly good at finding optimal execution plans. How does this apply to your scenarios? Scenario 1 (INSERT .. SELECT) The database knows that you're about to bulk-move a ...


For your specific example scenario 1 keeps all the data on the server. Scenario 2 will require the data to be packaged, sent over the wire to the client, where is must be buffered (and, perhaps, spilled to disk) then un-buffered, re-packaged and sent back to the server, where it will finally be processed. This network time adds up. Do this often enough ...

Top 50 recent answers are included