This series of posts attempt to look at the pros and cons of using Stored Procedures as data access method for Tableau reports. The points made here are valid as of Tableau 8.2.
Part 1 gives a general introduction and identifies areas where some of SProcs advantages become irrelevant when it comes to Tableau
Part 2 looks at metadata considerations
Part 3 looks at Execution Plan considerations
Part 4 looks at how Tableau uses stored procedures to answer different queries
Execution Plan Considerations
T-SQL is a declarative language; i.e. the language only asks for what is wanted and doesn’t specify how it should be done. In a typical RDBMS, this task of how to do it is left to the Query Optimizer. The Optimizer looks at the various indexes, number of rows present, server’s hardware configuration among other information and prepares a plan on how to do the task at hand.