Обсуждение: Asynchronous WRITES

Поиск
Список
Период
Сортировка

Asynchronous WRITES

От
andrew@pillette.com
Дата:
Java profiling with freeware tools can be a somewhat tricky thing, but my app appears to be spending quite a lot of
timein java.net.socketWrite, or in other words, executing various INSERT statements. 

If the DB is on another machine from the Java client, would I be able to get a speedup by INSERTing asynchronously? I
don'tcare about the return value; if things get messed up the application will find out soon enough. 

What would be the best way to do this in Java? I assume I have to create another Thread object to poll for DB INSERT
statements,but if someone has already done this, I'd like to know what to look out for.