You can use data blending to combine results from different data sources into a single visualization, but it cannot union the results which may be what you were hoping for.
Regarding the performance issue, does your stored procedure produce a very large result set? It may be the case that executing the stored procedure is fast, but iterating through all of the results may be slow. If you believe that the entire operation should be fast, please consider contacting Support (firstname.lastname@example.org) to report this problem, and they can work with you to gather the appropriate logs and understand how the problem reproduces.
Also, if your result set includes NVARCHAR(MAX), that was causing some major performance problems for us; DBA changed the data type and we got INSANELY huge performance gains.
Correct -- NVARCHAR(max) or VARCHAR(max) have an upper limit of ~2 GB. Even if you truly needed that much space for long, complex strings (or entire documents, etc.), it's unlikely that they would be useful for data analysis in Tableau since there's no metadata representation of the structure or content within such a large string.
I'm glad you have a DBA who's willing to tune the database specifically to improve Tableau performance!
Anything more you can elaborate on the NVARCHAR(max) issue?
I have a dynamic SQL procedure that uses NVARCHAR(max).
When I do this for a statement of under 4000 characters it works fine.
There is an issue in SQL Server where you can't set a local parameter to more than 4000 characters. But you can do something like this
SET @sql1 = ' SELECT ... FROM ... WHERE...' Set @sql2= @sql1 + ' Union ALL SELECT ... FROM ... WHERE...' ; EXEC sp_executesql @sql7;
When I do this the SPROC returns fine in SQL Server. However it gives the "returns no results" error message in Tableau.