During connecting with data source, the custom SQL plays an important role to select the required data for the dashboard from data source.
If the custom SQL is not written with performance aspects in mind, then the data refresh will suffer with performance issues.
Volume of the Data:
When the volume of the data that is touched during the data extract process is very high, it will cause performance issues.
Network and Connectivity:
When the data sources and Tableau server physically on different networks, then it can result in poor response time during the communication between Tableau dashboards and data sources.