delphi schematic for high i/o usage : i have a program that uses 5 com port for get data from hardware and save them in MySQL database and also transfer them to a third place with tcp/ip

for com ports i use Async so the have separated threads.so thay cant make the system ui lagy.but if i use MySQL connection in com threads it waste the time to read from buffer and make buffer over load error

on the other hand if i send data process and MySQL store to an Anonymous thread it cause a many working threads in queue

what is best way to handle this kind of apps?