Reuse a function descriptor

Looking up a UDR and creating its function descriptor can be an expensive operation. If you have multiple UDR invocations calling the same UDR through Fastpath, you can cache the function descriptor to make it available for reuse.

You make the function descriptor reusable within either of the following scopes:
  • Within the current SQL command.

    If the same UDR executes many times within a single SQL command, you can cache this function descriptor as part of the MI_FPARAM structure of the UDR.

  • Within the session.

    If the same UDR executes many times within a session, you can cache the function descriptor in PER_SESSION named memory.

When you reuse the function descriptor, you save the overhead of looking up the UDR and allocating a function descriptor each time you re-execute the same UDR.