Consultor Eletrônico



Kbase P145423: How does Fetch Array Size relate to memory usage by the server (_sqlsrv2)?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   28/04/2009
Status: Unverified

GOAL:

How does Fetch Array Size relate to memory usage by the server (_sqlsrv2)?

GOAL:

How is the amount of memory used by the server related to the Fetch Array Size for a DSN client?

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.x
OpenEdge 10.x

FIX:

There is no simple formula for the memory required for the result set rows "controlled by" the fetch array size.

The fetch array size, in effect, determines how many result set rows are buffered on the server before being sent back to the client over the network. So, the amount of memory needed is at least the sum of the sizes of the columns in each result set row, multiplied by fetch array size. The size of a character/decimal column, for data buffering, is determined by its defined SQL width, not the actual physical column value.

You could take the sum of column sizes multiplied by fetch array size, and then double it. That would give a number in the neighborhood of the amount of memory needed. This is roughly speaking, and not a definitive or an accurate estimate.
Also, if columns are very big, the doubling is not relevant, since big column size will make data structure overhead small in comparison.