During this part of this chapter, we will measure our performance based on the following three metrics:
- Load time
- Storage use
- Query performance
Let's see how it is done by performing the following steps:
- Open Tableau Desktop and click on Connect to Amazon Redshift. Fill in the credentials and click on Sign In:
Basically, we have now connected to Amazon Redshift. If you get an error, you should check your Firewall settings and make sure that you can connect with a SQL client to the cluster.
Now, we can choose the tables and create a Tableau data source. However, this isn't a true case. We need to make sure that we get the best possible performance. As a result, we need to learn more about our data usage, that is, SQL queries, patterns, tables, and joins.
- We should turn off Amazon Redshift caches to make accurate performance comparisons. In the following code block, we will run the following command:
set enable_result_cache_for_session to off;
- Let's finish our Tableau Data Source. We should use the following tables:
- customer
- lineorder
- supplier
- dwdate
The following screenshot depicts the preceding listed tables:
There are joins too, as shown in the following list:
- lineorder.lo_custkey = customer.c_custkey
- lineorder.lo_suppkey = supplier.s_suppkey
- lineorder.lo_orderdate = dwdate.d_datekey
- Finally, go to Sheet 1, and you will see that our data source has been created and is ready to use.