Olav Sandstaa wrote: >We are looking into the network traffic between the Derby JDBC driver >and the Network server and have compared this against MySQL and >PostgreSQL. The main finding is that Derby sends more messages than >the two other databases. > >For two simple transaction loads the following number of round-trips >between the client and server is done: > > Derby MySQL PostgreSQL >---------------------------------------- >"Select" 4 2 2 >"TPC-B" 8 6 6 > > > Are the additional round trips just on the first execution of a prepared statement?
One difference between our client and the DB2 Universal JDBC Driver is that JCC "defers prepares" which means that it waits to prepare the statement until it is first executed, so can save a single round trip on the first statement execution. This optimization was the source of many bugs, complexity in the code, and differences in embedded and client behaviour and not really that helpful in the common scenario where a statement is prepared once and executed many times. Kathey
