IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
1 reply Latest Post - ‏2013-01-17T22:11:43Z by krmilligan
3129 Posts

Pinned topic Why not use PROGRAM TYPE SUB in all your procedures?

‏2013-01-17T17:42:30Z |
I was just reading something about using this in procedures so they ran at a lower level like functions and completed more quickly. What is the downside to this? It almost seems like you would want to put this in every stored procedure.
Updated on 2013-01-17T22:11:43Z at 2013-01-17T22:11:43Z by krmilligan
  • krmilligan
    447 Posts

    Re: Why not use PROGRAM TYPE SUB in all your procedures?

    ‏2013-01-17T22:11:43Z  in response to SystemAdmin
    Essentially when the SQL Procedure support was first delivered PROGRAM TYPE MAIN was the only implementation available. PROGRAM TYPE SUB causes DB2 to use a Service Program object instead of a Program object to speed-up performance. If backward compatibility wasn't a concern, the default value would have been changed to PROGRAM TYPE SUB.