Wednesday, September 5, 2012

Native Dynamic SQL vs DBMS_SQL


Native Dynamic SQL
DBMS_SQL
Easy to use and concise.Often long-winded and awkward.
PL/SQL interpreter has built in support for Native Dynamic SQL so it is more efficient than DBMS_SQL.DBMS_SQL uses a Procedural API so it is generally slower than Native Dynamic SQL.
Supports user defined types.Does not support user defined types.
Supports FETCH INTO record typesDoes not support FETCH INTO record types
Not supported in client site code.Supported in client side code.
Does not support DESCRIBE_COLUMNSSupports DESCRIBE_COLUMNS
Does not support bulk Dynamic SQL, but it can be faked by placing all statements in a PL/SQL block.Supports bulk Dynamic SQL.
Only supports Single row Updates/Deletes with RETURNING clause.Supports Single and Multiple row Updates/Deletes with RETURNING clause.
Does not support SQL statements bigger than 32KDoes support SQL statements bigger than 32K
Parse required for every executionParse once, execute many possible

No comments:

Post a Comment