Kathey Marsden wrote:
Does the max query blocksize affect the DDMReader buffer size?
Good question. I assume you meant the DDMWriter that has the send
buffer, initial size of 32767.
The max query blocksize is an upper bound on the query block size that
the server will accept. This max value wont influence the send buffer
size, but the query block size (qryblksz) sent by the client will affect
the buffer size.
Here's my understanding of why that is the case:
qryblksz comes into play when returning data to the client. For
LMTBLKPRC, we read one entire row and write out into the "send buffer"
the data. If the "send buffer" cannot hold the data, we expand the
buffer size. ( DDMWriter.ensureLength()). Currently, the server's
algorithm for this is to compute the length of the current row, and to
stop trying to pack more rows into this buffer if another row of that
length would not fit into one query block of qryblksz.
So here are some cases:
Scenario 1 : Client sends 32k qryblksz, Server max qryblksz is 32k
Scenario 2: Client sends 32k qryblksz, Server max qryblksz is 10M
The memory consumption will not change in both these cases.
Scenario 3: Client sends 32k qryblksz, Server max qryblksz is 10M
Scenario 4: Client sends 64k qryblksz, Server max qryblksz is 10M
Scenario 4's buffer size will be greater than in Scenario 3. The fact
that the client sends a larger query block size will affect the buffer
size.
Scenario5: C Client sends 64k qryblksz, Server max qryblksize is 32k
--- Throws a protocol exception
Scenario 6: C client sends 64k qryblksz, Server max qryblksz is 10M ---
works ok.
Hope this helps (?).
Thanks,
Sunitha.