Hi all,
I have two tables that I want to join.
I have live streaming tweet data on TWITTER_ALL_DATA table which contains about 10 millions records right now (For this table, I have index on USERNAME column).
I have another table CUSTOMER_SOCIAL_MEDIA which has about 16K customer usernames (USERNAME column is already primary key on this table).
When I want to make an inner join on these two tables, it takes about 5 minutes to execute the following query:
SELECT COUNT(*) FROM CUSTOMER_SOCIAL_MEDIA T2 INNER JOIN TWITTER_ALL_DATA T1 ON T1.USERNAME = T2.USERNAME
I don't know why, but sometimes same query performs in 190 ms. But generally, the execution time is over 5 minutes as I said above.
I wanna reduce the execution time surely. Here is the planviz screenshots, what can I do?
Thanks,
Inanc