DB2 graphic  QMF Version 8

Limits

Use the Limits page to set warning and cancellation limits for the maximum number of rows and bytes of data QMF for Windows can retrieve. In addition, you can specify the maximum number of simultaneous connections QMF for Windows can establish to the database server.

Table 19. Resource Limits Fields
Field Description
Maximum Rows to Fetch Limits the number of rows of data that QMF for Windows retrieves from a database server when running a query.
  • Warning Limit: When this limit is reached, QMF for Windows prompts the user asking if more data should be fetched
  • Cancel Limit: When this limit is reached, QMF for Windows cancels the query and does not fetch any more data
Maximum Bytes to Fetch Limits the number of bytes of data that QMF for Windows retrieves from a database server when running a query.
  • Warning Limit: When this limit is reached, QMF for Windows prompts the user asking if more data should be fetched
  • Cancel Limit: When this limit is reached, QMF for Windows cancels the query and does not fetch more data
Maximum Connections Cancel Limit Limits the number of simultaneous connections that QMF for Windows establishes to the database server. Generally, connections are reused, so that if you run one query at a server and then run another query at the same server, only one connection is required.

However, two connections are required if you run two queries simultaneously. If QMF for Windows requires another connection to a server and this limit is reached, an error is returned and the operation is not performed.

Limiting data retrieval by rows or bytes

In QMF for Windows, specifying the maximum number of bytes of data that can be retrieved from a database server is a more accurate way of limiting data retrieval than specifying the maximum number of rows that can be retrieved.

Upon request from QMF for Window, a database server will continue to retrieve data and fill a buffer until the buffer is full or there is no more data. The buffer of data is returned to QMF for Windows. Immediately, QMF for Windows knows how many bytes of data are contained in the buffer. It does not know how many rows of data are contained in the buffer. QMF for Windows must process the data in the buffer and count the number of rows the buffer includes.

Meanwhile, after delivering the first buffer of data, the database server is ready to fill another buffer and will go ahead and fill another buffer unless it is told otherwise. If you are controlling the amount of data that can be retrieved by byte, QMF for Windows knows the amount that has been sent, knows the maximum limit that you have specified and can make the decision whether to request more data or stop.

If you are controlling the amount of data that can be retrieved by row limits, QMF for Windows has to process the data and count the number of rows. Therefore, it does not have the information it needs to stop the data retrieval process. So while QMF for Windows is parsing the current data in the buffer and counting the number of rows, the database server goes ahead and retrieves the next buffer of data. When the next buffer of data is delivered, QMF for Windows has the row count from the previous buffer. If the number of rows has been filled, retrieval of data is stopped. However, there can be extra rows of data that have been retrieved and that can mean extra overhead or users seeing more rows than intended.

Controlling buffer size

QMF for Windows allows you to control the size of the buffers using the QueryBlockSize parameter in the SDF. To set the query block size, edit the Server Definition File (SDF) with Notepad or comparable text editor. Find the section for the server you are accessing. Add a line in this section that reads QueryBlockSize=nnn where nnn is the desired block size in bytes.

If the query block size is set to a small value, the response time for receiving each block of data is quicker. However, the amount of time required to retrieve all of the data is higher, because a larger total number of blocks must be transmitted.

If the query block size is set to a large value, the response time for receiving each block of data is longer. However, the amount of time required to retrieve all of the data is smaller, because a smaller total number of blocks must be transmitted.

The smallest allowable query block size is 512. The largest allowable query block size is 32767. If you do not specify a query block size, the default 32,500 is used as the default.


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004