13 Replies Latest reply on Aug 21, 2013 10:05 AM by Dan Cory

    What exactly is happening in Tableau when we navigate from dashboard to dashboard

    Saken Kulkarni

      Hello all,

       

      I have a large dashboard in which I would like to optimize the performance (i.e. initial load times, filtering times, time taken to navigate from dashboard to dashboard). In this effort, I am trying to fully understand what Tableau is doing every time a user interacts with it.

       

      Here are the broad categories that I am trying to understand:

       

      • Initial Load: When I open a Tableau dashboard on Server or Desktop, is it loading the entire workbook? In other words, it is executing all of the queries, rendering all of the layouts, computing all totals, executing all calculated fields for every worksheet and dashboard in the entire workbook? Or is it just loading the XML?
      • Navigation from Dashboard to Dashboard: After an initial load of my workbook, and I navigate from dashboard 1 to dashboard 2, what exactly is happening (assuming that dashboards 1 and 2 have different visualizations? As I navigate to dashboard 2, is it executing the query, rendering the views, and computing the totals for that dashboard? Or has that already been done? If i then navigated to dashboard 3 and then back to dashboard 2, will it executive all of those commands again?



      It's hard to know what Tableau is doing in the background due to the VizSQL, but any help is greatly appreciated.


      Thanks

      Saken

        • 1. Re: What exactly is happening in Tableau when we navigate from dashboard to dashboard
          Toby Erkson

          Good questions!

          My guess is that when the wkbk is loaded it's just the XML and data.  Then the viz gets generated.  If no filtering occurs when switching between vizes then what's in the cache is loaded...but that also depends on how the server is set up with its Caching options in the Data Connections of the Tableau Server Configuration.

          1 of 1 people found this helpful
          • 3. Re: What exactly is happening in Tableau when we navigate from dashboard to dashboard
            Dan Cory

            You can use the performance recorder to record these operations and see when they happen as well.

             

            Dan

            1 of 1 people found this helpful
            • 4. Re: What exactly is happening in Tableau when we navigate from dashboard to dashboard
              Saken Kulkarni

              Thanks Toby and Dan,

               

              Toby, your hypothesis makes sense, but I ran the performance recorder on a use case without a filter, and it seems to execute a query every time i navigate from one dashboard to another.

               

              Also, the performance recorder seems to spit out the same syntax for each query (a syntax that doesn't make too much sense to me, but maybe I am not reading it correctly)

               

               

              I am hoping that someone from Tableau can comment on this. It is difficult to understand what exactly is happening in the VizQL. Also, the number one question that my clients are asking is what exactly is Tableau doing when I navigate from dashboard to dashboard?

               

              Note : Extract is the table and CLASS is a dimension

               

              CommandIndex

              "(restrict

                (aggregate

                  (select

                    (project

                      (restrict

                        (project

                          (table [Extract].[Extract])

                          (

                            ([none:CLASS:nk] CLASS])

                            ([none:Reinsurer (copy):n"

               

               

              • 5. Re: What exactly is happening in Tableau when we navigate from dashboard to dashboard
                Russell Christopher

                Saken -

                 

                We do not "pre-render" every dashboard in a workbook that has multiple dashboards. When you navigate to "Dashboard1", we render it. Then, when you navigate to Dashboard2, Dashboard3, etc. we render those as you land on them.

                • 6. Re: What exactly is happening in Tableau when we navigate from dashboard to dashboard
                  Toby Erkson

                  Yeah, you're right, that syntax doesn't make sense.  A guide would be helpful on how to read it.

                  • 7. Re: What exactly is happening in Tableau when we navigate from dashboard to dashboard
                    Russell Christopher

                    It's not uncommon for the "Query" window to partially truncate the longer queries. What's most likely happening is that the differences you're looking for are there...but that part has been truncated.

                    • 8. Re: What exactly is happening in Tableau when we navigate from dashboard to dashboard
                      Saken Kulkarni

                      Hi Russell,

                       

                      Thanks for the quick response. Let me try to put together my thoughts:

                       

                      1) So if every dashboard is not pre-rendered, what exactly happens upon initial load?

                      2) When you say rendering, does that mean that

                           a) Tableau is querying data from the extract or live connection

                           b) Tableau is computing layouts and generating graphics

                           c) Tableau is computing subtotals

                       

                       

                      Thanks

                      Saken

                      • 9. Re: What exactly is happening in Tableau when we navigate from dashboard to dashboard
                        Russell Christopher

                        >> 1. So if every dashboard is not pre-rendered, what exactly happens upon initial load?

                         

                        The definition of the report is fetched from our metadata store, a vizQL process connects to the data store (whatever it happens to be), executes queries, does any local calculations that need to be taken care of, sorts results, and lays out the viz itself.

                         

                         

                        >> 2. When you say rendering, does that mean that

                         

                        >>     a) Tableau is querying data from the extract or live connection

                         

                        >>     b) Tableau is computing layouts and generating graphics

                         

                        >>      c) Tableau is computing subtotals

                         

                        Yes!

                        • 10. Re: What exactly is happening in Tableau when we navigate from dashboard to dashboard
                          Saken Kulkarni

                          Thanks Russell!

                           

                          Your point on local calculations really piqued my interest. Our hypothesis is that moving as many calculated fields as possible back to the database rather than the reporting layer will improve performance, as Tableau will not have to render as many calculations. Is this correct?

                           

                          How and when are calculated fields in Tableau computed? When Tableau renders each dashboard? Or are these the local calculations you speak of when the dashboard is initially loaded.

                           

                          Saken

                          • 11. Re: What exactly is happening in Tableau when we navigate from dashboard to dashboard
                            Russell Christopher

                            >>Your point on local calculations really piqued my interest. Our hypothesis is that moving as many calculated fields as possible back to the database rather than the reporting layer will improve performance, as Tableau will not have to render as many calculations. Is this correct?

                             

                            Yes. And this is what we generally do automatically – you don’t need to do anything special as we’ll mostly “automagically” write the necessary SQL to do this work versus you doing it in a custom SQL statement.

                             

                            >>How and when are calculated fields in Tableau computed? When Tableau renders each dashboard? Or are these the local calculations you speak of when the dashboard is initially loaded.

                             

                            This is a big question, but here are two “buckets” to give you an idea.

                             

                            You’ve already asked to see a subtotal of sales for region1, region2, region3. There is a grand total across all 3 regions. Now you filter out region2. We already know the subtotals for each region, so why back to the database? We’ll calculate region1+region3 for your grand total locally.

                             

                            You’re using “Table Calculations” (read about these in help). By definition, this work is calculated by Tableau.

                            • 12. Re: What exactly is happening in Tableau when we navigate from dashboard to dashboard
                              Saken Kulkarni

                              Hi Russell,

                               

                              Thanks for your reply,

                               

                              SK -Your point on local calculations really piqued my interest. Our hypothesis is that moving as many calculated fields as possible back to the database rather than the reporting layer will improve performance, as Tableau will not have to render as many calculations. Is this correct?

                               

                              RC- Yes. And this is what we generally do automatically – you don’t need to do anything special as we’ll mostly “automagically” write the necessary SQL to do this work versus you doing it in a custom SQL statement.

                               

                              SK - Ok. What I meant is if we are creating a datamart. Rather than having A + B= C in Tableau, we can do A + B= C in the database so make it perform faster...Are you saying that Tableau recognizes calculations based on certain "buckets" and then optimizes the SQL query for performance?

                              • 13. Re: What exactly is happening in Tableau when we navigate from dashboard to dashboard
                                Dan Cory

                                The queries you posted are data engine queries (not SQL queries), so you must be using an extract.

                                 

                                In that case, some calculations (generally dimensions) will get pre-computed when creating the extract, if Tableau thinks it's a good optimization. Some calculations (generally measures) will still get computed at the time you create the viz.

                                 

                                In general, queries aren't run until their data is needed. Tableau attempts to use the results of prior queries to speed up later queries. For instance, if you filter out a dimension value, Tableau will just skip that value in the results, rather than re-running the query.

                                 

                                Pre-computing things in your data mart probably won't make much difference to your dashboard. They may speed up creation of the extract, but that doesn't sound like the issue.

                                 

                                One area you should explore is the options for creating an extract. You can create filters for an extract or pre-aggregate the data for an extract. Both of these will create extracts with fewer rows and therefore faster queries and therefore faster dashboard transitions.

                                 

                                If you are able to share your dashboard and extracts with Tableau and they are especially slow, we are always interested in additional samples that can be added to our performance tests. You can send it to me or to support.

                                 

                                Dan