mysql process 10M records table : recently I am using  mySQL to process some tables with over 40M records.
The detail scenario is as follows:
Given two tables with same structure containing over 40M price info 
Table 1
product_id	price	 date
101	        5.7	     2016/1/1
102      	11.6	 2016/1/1
104	        8	     2016/1/1
…	        …	      …

Table 2
product_id	price	 date
101	        5.9	     2016/1/2
103      	20.3	 2016/1/2
104	        8	     2016/1/2
…	        …	      …

my goal is to find out how many product_id exist on both days, and I use the below query to search:

SELECT count(*) FROM t1 a,t2 b where a.product_id=b.product_id ;

SELECT count(*) FROM t1 a,t2 b on a.product_id=b.product_id ;

It takes over half an hour to get the result, is there any way to improve the performance?
