2 Replies Latest reply on Sep 26, 2018 7:30 AM by Alyssa Ashton

    Query performance question

    Alyssa Ashton

      I am building a data source in desktop, and it gets hung up on a join between one particular table.  Table A to Table b, both with records in the millions, takes about 1/2 an hour to load.  Running the Performance Recording, what it looks like it is doing is, pulling everything from table A in query 1, everything from table B in query 2 then joining the tables in an additional query.  Is this the norm?  How do we join first then pull the records so we don't need to pull everything?  I thought it might have something to do with the indexes?  The field I am joining on is NOT an index in Table A. 

       

      Thanks.

        • 1. Re: Query performance question
          Ken Flerlage

          What data source are you using? Are both tables in the same data source or different?

          • 2. Re: Query performance question
            Alyssa Ashton

            MS SQL Server data source.  It was one data source with two different connections, as TAble A and TAble B are on the same server, different database.  It was pointed out to me, that when you create the two connections, it is actually like two different data sources.  So they suggested create one data source with one connection to Table A database.  Link to Table B via custom sql and add the database to the code.  This worked.  When you try to link to two different databases in one data source, I always get the message that says Tableau requires a separate connection for the second database so I always did it that way.