# Learning Background Of The Multi-Table Connection Case Study (Continued...)

+ Join query statement for two tables
+ Execution plan

```
SELECT count(*) FROM t1 JOIN t2 ON t1.k=t2.k WHERE t1.c > '96743211';
```


![left](./student-guide/diagram/01-48-1.png)

------------------------------------------------------------

The two table join query statement and execution plans are as follows:

```
SELECT count(*) FROM t1 JOIN t2 ON t1.k=t2.k WHERE t1.c > '96743211';
```

From the execution plan, both tables are TableFullScan full table scan, the aggregation operator uses a hash join, the data volume estimate is 100w data, the driving table is t1 table, t2 is the driving table, this execution plan is very poor, the execution time is about 1.5 seconds, so how to optimize, here the optimization points can be considered from two aspects: 1 .drive driving table data is filtered by an index or scanned through an index. 2. The driving table is connected to the index table.
