I require to loop through different servers to collect data in a temporary table. The table accessed on these servers have about half a billion records. To retrieve the data from these tables, I filter out rows using a list of values for one of the columns. The query takes about 5-10 mins for each server. However, if I add image column to the select list, the query hangs.
I was wondering if it is acceptable to obtain image column in such a scenario ? Will it hit the performance ?
CREATE TABLE #TempPI( RowId INT IDENTITY(1,1), [id] [char](22) NOT NULL, [name] [varchar](128) NOT NULL, [time] [varchar](50) NOT NULL, [url_id] [char](22) NOT NULL --file IMAGE NULL) CREATE TABLE #TempBrowser( [browserid] [char](22) NOT NULL) BULK INSERT #TempBrowser FROM '\\Shared\BulkLoadDocs\Input.txt' WITH (ROWTERMINATOR = '\n') INSERT INTO #TempPI SELECT [id] , [name] , [time] , [url_id] FROM Server.Database.DBO.table1 a WITH (NOLOCK) WHERE exists (Select * from #TempBrowser b where a.ID=b.BrowserId)
If I use File column, the query hangs.