The chat module of the pubhub is still too resource-intensive for the mysql server.
On each chat line it receives it does a INSERT, SELECT and DELETE. With about 10 arenas being monitored this hogs the mysql server pretty much.
Flibb has given a good recommendation to use prepared statements but unfortunately TWCore doesn't support those.
So instead I'm going into a different road: Pubhubchat caches the chat lines and has a socket running. The PHP front-end, tw.org, opens a socket to the pubhubchat and requests the chat lines it needs every 10 seconds per user.
This approach totally skips the mysql server which is the reason why I'm doing this.