15 July 2011

Use LIMIT to "control PGA" in session? (4498)

The 14 July quiz tested your knowledge of the LIMIT clause of BULK COLLECT. We scored as correct the following choice:

Use the LIMIT clause to control the amount of Process Global Area (PGA) memory used by the session running your program.

A player raised the following objection to this:

While limiting the number of rows returned is likely to reduce the amount of memory required, it does not constrain the amount of PGA allocated. Even if I were to agree that it controlled the amount of PGA used by the BULK COLLECT, that is not the same as controlling it for the session.

Before I respond, I would like to offer it up to other players for their comments. What do you think? Should we mark this as incorrect and why? Or do you feel this language is sufficiently clear to warrant a correct scoring?