UDFs are no magic bullets and can hurt as well as help. For providing SELECT access to data outside of DB2, table UDFs provide a neat solution. As for the costs involved, this code runs in a seperate address space (which is started by WLM if not already there) under its own TCB thus requiring a task switch and cross memory move of data for every row accessed. The code stays resident and its data kept so setup and tear down happens only once per SELECT.
On Thu, 12 Jun 2008 23:48:14 +1000, Shane Ginnane <ibm- [EMAIL PROTECTED]> wrote: >mmmm - just this week one of my guys tested a UDF (which I'd never heard >of) to make a customers life (supposedly) easier. >Service unit consumption was *in excess* of an order of magnitude higher. >The idea was quickly abandoned. > >Shane ... >(caveat - I can't even spell DB2) > >Quoting Mohammad Khan: > >> No, you can't but you can write a "table user defined function" which >> will allow DB2 to present this data as a DB2 table. > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

