Relational databases are supposed to do exactly that kind of work, log files are not. We can of course argue that there are better/faster solutions but this was not a question at hand so I will skip this.
If you know how to normalize data & use indexes there should be no problem at all but I would suggest archiving older chats into separate set of tables (eg every night move all chats older then 2 days ) so indexes and live data set would be as small as possible and even possibly data set could be kept in memory (MySQL works blazing fast when it can keep all needed data in memory).
On the other hand having 20 requests per second could be a problem on your shared hosting since those kinds of hostings are not meant for that much traffic( only polling data for 1 chatroom with 20 users would generate 1.7 million requests per day). That number of requests can create problems independently of what is your data source (mysql,log file, memcached,mongo).