Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

performance issues writing udf

34 views
Skip to first unread message

datenwort

unread,
Aug 9, 2010, 1:00:59 AM8/9/10
to
hello,

i try to implement some methods in udf for db2 (no specific platform).
now i am unsure if it would be better using c or java as programming
language. is there a benchmark for getting information about the
performance using these languages or a comparison?

thanks and regards

Mark A

unread,
Aug 9, 2010, 8:47:23 AM8/9/10
to
"datenwort" <sebastian...@sowarent.de> wrote in message
news:87615d9a-ea60-48d7...@d17g2000yqb.googlegroups.com...

C Not Fenced is the best (but you must make sure they are thread safe our
you could bring down DB2.
Java is the worst (always fenced).
SQL is in-between.


datenwort

unread,
Aug 9, 2010, 10:10:44 AM8/9/10
to
hello,

thanks for answering. why is java the worst case in developing user
defined functions? is there a benchmark or just own experience?

On 9 Aug., 14:47, "Mark A" <no...@nowhere.com> wrote:
> "datenwort" <sebastian.saemi...@sowarent.de> wrote in message

Mark A

unread,
Aug 9, 2010, 10:18:42 AM8/9/10
to
"datenwort" <sebastian...@sowarent.de> wrote in message
news:a3eab89a-ba2e-4e45...@f6g2000yqa.googlegroups.com...

> hello,
>
> thanks for answering. why is java the worst case in developing user
> defined functions? is there a benchmark or just own experience?
>

Partly because Java always runs as fenced mode, and partly for other
reasons. The information was previously provided by IBM architects on this
newsgroup, although it was specifically referring to Stored Procedures. If
you go to Google groups you may be able find the old posts on this subject.


Helmut Tessarek

unread,
Aug 9, 2010, 2:06:18 PM8/9/10
to
> thanks for answering. why is java the worst case in developing user
> defined functions? is there a benchmark or just own experience?

You can use db2batch to test the performance of your UDFs.

--
Helmut K. C. Tessarek
DB2 Performance and Development

/*
Thou shalt not follow the NULL pointer for chaos and madness
await thee at its end.
*/

Serge Rielau

unread,
Aug 10, 2010, 2:09:41 AM8/10/10
to
I'm actually presently preparing a deck called "versus" where I
investigate such questions.
SQL UDF actually are faster than C-UDF when they are just encapsulating
simple expression evaluation. That is because even an unfenced UDF
undergoes overhead. And of course a SQL UDF DB2's optimizer can understand.

--
Serge Rielau
SQL Architect DB2 for LUW
IBM Toronto Lab

--CELKO--

unread,
Aug 10, 2010, 8:20:51 AM8/10/10
to
>> I'm actually presently preparing a deck called "versus" where I investigate such questions. SQL UDF actually are faster than C-UDF when they are just encapsulating simple expression evaluation. That is because even an unfenced UDF undergoes overhead. And of course a SQL UDF DB2's optimizer can understand. <<


Will you post the details somewhere or send me a copy?

Serge Rielau

unread,
Aug 10, 2010, 11:23:19 AM8/10/10
to
On 8/10/2010 8:20 PM, --CELKO-- wrote:
>>> I'm actually presently preparing a deck called "versus" where I investigate such questions. SQL UDF actually are faster than C-UDF when they are just encapsulating simple expression evaluation. That is because even an unfenced UDF undergoes overhead. And of course a SQL UDF DB2's optimizer can understand.<<
> Will you post the details somewhere or send me a copy?
It will be presented at DB2 Aktuell in Germany in mid September and then
at IDUG in November.
Once it's completed I have no qualms distributing it to interested parties.

Cheers
Serge

0 new messages