13.01.2013 Views

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Using the block cursor switches<br />

ODBC options<br />

The <strong>Data</strong><strong>Server</strong> provides one switch to enable or disable block cursors, and two<br />

switches to regulate memory consumption by block cursors. Block cursors also interact<br />

with the query tuning cache size allocations.<br />

Block cursors—the -Dsrv PRGRS_BLOCK_CURS,1 option<br />

Block cursors are ON (1) by default. To disable block cursors <strong>for</strong> the entire connection,<br />

set this option to OFF (0). The connection-level setting can be overridden <strong>for</strong> a specific<br />

query with the query-tuning option: QUERY-TUNING(NO-LOOKAHEAD).<br />

Block cursor allocation by table—the -Dsrv PRGRS_TABLE_BLOCKSIZE,nnn<br />

option<br />

The -Dsrv PRGRS_TABLE_BLOCKSIZE,nnn option where nnn is the size in bytes,<br />

indicates the total allowable memory available to cursors of a given table. This value<br />

puts a cap on the amount of memory all the open cursors against a given table can<br />

consume. It does not determine an amount to be allocated. This upper limit on memory<br />

allocation ensures that memory is not overutilized.<br />

ODBC_DEF_TABBLOCKSZ is the default value <strong>for</strong> PRGRS_TABLE_BLOCKSIZE. It is currently<br />

set at 65,000 bytes. At this rate approximately 18 tables open and utilizing all available<br />

cursor space <strong>for</strong> block cusrors would utilize just 1 MB of memory. If record sizes are<br />

large or the typical row count of your result sets is large and you have plenty of avilable<br />

memory and your open table count is not too large, you might consider increasing this<br />

size. If you are using served <strong>OpenEdge</strong> clients, keep in mind that the memory<br />

requirments of the <strong>Data</strong><strong>Server</strong> server executable on the server machine are<br />

compounded by the number of users attached to the database through the same<br />

broker.<br />

Total Block cursor allocation—the -Dsrv PRGRS_MAX_BLOCKSIZE,nnn option<br />

The -Dsrv PRGRS_MAX_BLOCKSIZE,nnn option where nnn is the size in bytes, indicates<br />

the total allowable memory available to all cursors established as block cursors. This<br />

value limits the total memory available to all block cursors irrespective of the table to<br />

which it is allocated. ODBC_DEF_MAXBLOCKSZ sets the default size which is currently<br />

1MB. The overall memory allocated to block cursors by the <strong>Data</strong><strong>Server</strong> connection<br />

cannot exceed the value set <strong>for</strong> PRGRS_MAX_BLOCKSIZE. Any block cursor that will place<br />

memory consumption over this threshold will be rejected as a block cursor and instead<br />

be established as a lookahead cursor.<br />

Impact of block cursors on cache size—the -Dsrv QT_CACHE_SIZE,nnn option<br />

The -Dsrv QT_CACHE_SIZE,nnn where nnn is the size in bytes of the cache to be<br />

allocated <strong>for</strong> a cursor’s result set. This is a connection level default that can be<br />

overridden at the query level. If the connection level cache size is not overridden at the<br />

query level, then the query cache size times the number of open cursors cannot exceed<br />

the maximum block areas <strong>for</strong> the table set by the -Dsrv PRGRS_TABLE_BLOCKSIZE<br />

switch at any given time. The accumulation of query cache sizes from each block<br />

cursor that has been allocated cannot exceed the total maximum block areas available<br />

to block cursors as set by the -Dsrv PRGRS_MAX_BLOCKSIZE switch. If either block<br />

cursor limit is reached, cursors will downgrade to lookahead cursoring. There is no<br />

minimum <strong>for</strong> this value, however if two or more records cannot be returned to the<br />

established block, a lookahead cursor is used. The query tuning cache size should be<br />

set higher than the maximum record size times two to prevent cursor downgrades.<br />

<strong>OpenEdge</strong> <strong>Data</strong> <strong>Management</strong>: <strong>Data</strong><strong>Server</strong> <strong>for</strong> <strong>Microsoft</strong> <strong>SQL</strong> <strong>Server</strong> 331

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!