开发者

Java RDBMS performance

If I have a method in a Java application for inserting data in to a RDBMS does the method move forward once it has passed the query to the database. i.e will the java application finish the method(connect, run query, close connection) before the RDBMS has processed the query. I want to run some tests but was not sure if the application will finish before the RDBMS and as a result give very little insight into how quickly 开发者_C百科the database has processed the data?

I guess I could finish each test, with drop table close connection, to ensure that the application has had to wait for the RDBMS to catch up.

Also will using the Eclipse IDE to test RDBMS over different opperating systems affect the performance drastically of the O.S it is running on. (Windows7 Solaris Ubuntu)

Thanks to anyone who makes an attempt to answer.


Using an IDE won't affect performance - it's just a regular JVM that is started.

As for the other question - unless you are using some asynchronous driver (I don't know if such exist), or starting new threads for each operation, they are synchronous - i.e. the program waits for the database to return result (or to timeout, which should be configurable)


Generally, all such calls are synchronous; they block until the operation completes. Unless you are doing something very different.

You may want to look into connection pooling so that you can reuse the connections to avoid creation/destruction costs which can be substantial.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜