文档介绍:原文一:
Java Programming with Oracle JDBC:Performance
Performance is usually considered an issue at the end of a development cycle when it should really be considered from the , a task called "performance tuning" is done after the coding plete, and the end user of a plains about how long it takes the program plete a particular task. result of waiting until the end of the development cycle to consider performance includes the expense of the additional time required to recode a program to improve its 's my opinion that performance is something that is best considered at the start of a project.
When es to performance issues concerning JDBC programming there are two major factors to consider. The first is the performance of the database structure and the SQL statements used against it. The second is the relative efficiency of the different ways you can use the JDBC interfaces to manipulate a database.
In terms of the database's efficiency, you can use the EXPLAIN PLAN facility to explain how the database's optimizer plans to execute your SQL statements. Armed with this knowledge, you may determine that additional indexes are needed, or that you require an alternative means of selecting the data you desire.
On the other hand, when es to using JDBC, you need to know ahead of time the relative strengths and weaknesses of using mit, SQL92 syntax, and a Statement versus a PreparedStatement versus a CallableStatement object. In this chapter, we'll examine the relative performance of various JDBC objects using example programs that report the amount of time it takes to plish a given task. We'll first look at mit. Next, we'll look at the impact of the SQL92 syntax parser. Then we'll start a series parisons of the Statement object versus the PreparedStatement object versus the CallableStatement object. At the same time we'll also examine the performance of the OCI versus the Thin driver in each situation to see if, as Oracle's claims, there is a signif