Question

I have a stored procedure as a source connection in Tableau 8.1. It takes a long time to fetch and display ( about 1 min) 40000 records (there is no bar chart, pie charts etc). What the stored proc does is it selects 40000 records with some 6-7 table joins. However the same stored procedures executes and displays the records in sql server management studio within 3 seconds.

After using SQL Server Profiler, it shows that some 45000 inserts into a tableau temp table occurs which takes a long time. Also, it shows in the log file that it takes a high percentage of time for the inserts while the execution of stored proc itself takes about 4-5 seconds only.Is this the problem ?Any suggestion how to over come this issue?

Regards Gautam S

Was it helpful?

Solution

A few of places to start:

  • First check out the Tableau log file in your Tableau repository directory after trying to access your data. There will be a lot of information in there, but you should be able to see the actual SQL that Tableau sends to your database -- and that may give you some clues about what it is doing that is taking so long. If nothing else, you can cut and paste the SQL into your database tools and try to isolate the problem SQL without Tableau in the mix
  • If the log file doesn't give you an idea about how to restructure your system to avoid the long query, then send it along with info about your schema to Tableau support. They may be able to help.
  • Simplify whatever you can to reduce the problem to its core, get rid of everything in your visualization but a total, and then slowly build it back up to see what causes the behavior. For example, make a test version and remove one table at a time from your query to see what causes the problem.
  • Avoid using quick filters if you see performance problems (or minimize them) Nice feature, but comes with a performance cost
  • Try the Tableau performance monitoring (record and analysis) features
  • Work with a smaller data set during testing so you can more quickly experiment with different approaches
  • Try replacing your stored procedure with a view. That's usually better if at all possible.
  • Add indices to speed the joins
  • If there is no way around the long operation and if updates are infrequent, make a Tableau extract so that you only pay that cost periodically

If none of these things help, cut the problem down to its simplest version and post a schema and the problem SQL Otherwise, people can only give you generic advice

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top