Database Reference
In-Depth Information
database engine, comparing test case 3 with the other two. This is caused by the data sent over the network in order to
open and close a new cursor (in test case 3, the text of the SQL statement is sent only once over the network, together
with the first open, and the cursor is closed only once, at the end).
Figure 12-6. Network traffic for a single execution of the three test cases
Since the size of the messages sent through the network differs, the response time is expected to depend on the
network speed. If the network is fast, the impact of the communication between the client and the server is low or not
even noticeable. If the network is slow, the impact may be significant. Figure 12-7 shows the response time for two
network speeds. Notice how the time spent by the database engine processing the calls for a given test case doesn't
depend, obviously, on the network speed.
Figure 12-7. Response time with two network speeds for the three test cases
Even if the network speed had the biggest impact on the overall response time, it's important to note that the
three test cases have a different impact on the client-side resource utilization, specifically the CPU. Figure 12-8 shows
the client-side CPU utilization for the three test cases. The comparison of the figures for test case 1 and test case 2
shows that the use of bind variables has an overhead for the client. The comparison of the figures for test case 2 and
test case 3 shows that creating and closing SQL statements also cause an overhead for the client.
 
Search WWH ::




Custom Search