Pure Table Scans

SQL Server scans the entire remote table from the provider and performs all query evaluation locally. The rowset corresponding to the table is opened by calling IOpenRowset::OpenRowset. SQL Server constructs the table name supplied to OPENROWSET from the catalog, schema, and object name parts as follows:

  1. Each of the name parts are quoted with the provider’s quoting character (DBLITERAL_QUOTE) and then concatenated with the DBLITERAL_CATALOG_SEPARATOR character embedded between them.
  2. After the rowset object is opened, SQL Server uses the IColumnsInfo interface to verify that the execution-time metadata is the same as compile-time metadata for the table.
  3. SQL Server uses the IRowset interface to navigate and consume rows from the table. Use IRowset::GetNextRows to fetch rows, IRowset::RestartPosition to reposition to the beginning of the rowset, and IRowset::ReleaseRows to release rows.