Table Reel / Eager Spool

I have a request

select * into NewTab from OpenQuery(rmtServer, 'select c1, c2 from rmtTab') 

When I look at the execution plan, he tells me that he runs "Spool / Eager Spool", which "stores data in a temporary table to optimize rewinding"

Now I do not expect rewind. If there is some kind of failure, I can just drop newTab and start over.

Is there a way to stop it from storing data in a temporary table?

+3
source share
2 answers

This probably caused openquery.

There is no information about how many rows, no statistics, nothing, so SQL Server will simply run the results to allow it to evaluate the later bits that I suspect. This is the main idea.

newtab.

, . . SQL Server, . , openquery - .

Simple Talk . " ".

Edit

, , sp_tableoption.

OPENROWSET , TABLOCK

TABLOCK . , .NET. SQLBulkCopy .

Kalen Delaney

.

+4

NewTab, ... openquery.

+1

Source: https://habr.com/ru/post/1705105/


All Articles