Hi - apologies if this is a newbie question - I have googled it but found nothing definitive.
I am downloading data from an external source - SQL Server using Native ODBC.
Connectivity etc. is all fine, the download works, but is very SLOW.
I am connecting to a View on the source server, which is comprised of several tables (as you would expect).
One of the tables has ~4 million rows.
The load that I have on my machine (destination) is filtered on a created on date being between two values.
The created on date is one of the fields in the view.
The download takes about 20 minutes to return a single row (result is correct, it should only return a single row at the moment).
My question is:
Does the remote server generate the entire view, THEN apply my WHERE clause (given that the WHERE is based on one of the view fields)?
Have to check tomorrow, but if I remember correctly, if I query the view on the source server itself using the same where clause, it returns the record in less than a minute.
The tables underlying the view are indexed, I need to confirm whether everything is indexed properly - I have only just got that level of access. Unfortunately I can not currently view the execution plans on the source server.