2 Replies Latest reply on Nov 15, 2016 2:21 PM by David Hernandez

    Performance: Joining Views in Tableau vs. Joining Views in Database

    David Hernandez

      Hi All,


      I was wondering if anyone could help me understand the differences (especially in performance) between joining in Tableau and joining in the database, given my specific circumstance.


      Situation: I have two existing views (NOT materialized) in my database that I want to join together in order to create a new data source, which I will then turn into a data source extract to be refreshed nightly. From my point of view I have two options:


      1. Create a new view that joins my two existing views in the database (NOT materialized)
      2. In Tableau Desktop, bring these two views in as data sources and join them through the Tableau GUI


      From my point of view, these two options will essentially fire off the same SQL query to the database (correct me if I am wrong)


      Can anyone help me understand what differences in each approach are? I have been told that the more that is done on the DB, the better, but really isn't all the processing being done by the DB in both scenarios?


      I do not feel like there would be any difference from an end-user consumption point of view since they will eventually turn into extracts, so are there any impacts on how Tableau updates these extracts?


      Thank you for your help.

        • 1. Re: Performance: Joining Views in Tableau vs. Joining Views in Database
          Dmitry Chirkov
          1. What database are we talking about?
          2. Do you only plan to extract the data?


          If you are just going to extract the data then it does not really matter. All that Tableau will run is SELECT * FROM TABLE query, spiced up with extract filters if you have those. That's a straightforward request - join or view won't matter here so if you have a DBA that can create and maintain it - why not?


          Now, if we'd go to live - it would purely depend on what backend you are dealing with and how does it handle views - how indexes are used, how caching is handled, how complex queries are handled (like subselects), how underlying metadata is reported etc. Tableau performs certain optimizations based on PK/FK presence, null-ability of columns so most of that might not be available anymore so question would be - can database engine handle complex generated queries Tableau might send it's way.


          I, personally, would only consider views for following reasons:

          • reusability (no need to join every time new workbook is created)
          • complex operations that Tableau can't do (like union, rollup)
          • Exposing proper data model to your users with proper names, must-have calculations etc
          2 of 2 people found this helpful
          • 2. Re: Performance: Joining Views in Tableau vs. Joining Views in Database
            David Hernandez

            A tad (er, a lot) late, but thank you for your response!