5

When using an OLEDB source editor, is there a performance benefit or difference in using "Sql Command" over "Table or View" when you want the entire table?

This is a variation on this question, in which the asker is talking about scenarios where they only want one or some columns in a table - in which case there is a benefit to using "Sql Command", as a select * from is still executed in the background when using "Table or View" even when columns are unticked.

I've also found this entry on the MSDN blog which states it is more efficient when looking at views due to the use of OpenRowset and a SET ROWCOUNT 1 which results in an inefficient query plan being cached and reused for the actual execution.

But if you're loading in a table and want every column, is there still an advantage to using the "Sql Command" option over "Table or View"?

0

1 Answer 1

1

At one point in the product's past, selecting the table name from the drop down versus writing an explicit SELECT * FROM MyTable resulted in one fewer operation being performed. The table name selection did...something I can't reproduce now. It'd issue a command like though that resulted in a SELECT * but with an outer wrapper around it.

Profiler reports for 2014, it issued the command select * from [SB].[EventLog] A 2005/2008 instance would have indicated it did something like sp_somethingweird [SB].[EventLog]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.