Topic
1 reply Latest Post - ‏2013-01-17T22:11:43Z by krmilligan
SystemAdmin
SystemAdmin
3129 Posts
ACCEPTED ANSWER

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
    krmilligan
    356 Posts
    ACCEPTED ANSWER

    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.