dbTalk Databases Forums  

performance issues writing udf

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss performance issues writing udf in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
datenwort
 
Posts: n/a

Default performance issues writing udf - 08-09-2010 , 12:00 AM






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

Reply With Quote
  #2  
Old   
Mark A
 
Posts: n/a

Default Re: performance issues writing udf - 08-09-2010 , 07:47 AM






"datenwort" <sebastian.saemisch (AT) sowarent (DOT) de> wrote

Quote:
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
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.

Reply With Quote
  #3  
Old   
datenwort
 
Posts: n/a

Default Re: performance issues writing udf - 08-09-2010 , 09:10 AM



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... (AT) nowhere (DOT) com> wrote:
Quote:
"datenwort" <sebastian.saemi... (AT) sowarent (DOT) de> wrote in message

news:87615d9a-ea60-48d7-b122-b3f8fe415b08 (AT) d17g2000yqb (DOT) googlegroups.com...

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

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.

Reply With Quote
  #4  
Old   
Mark A
 
Posts: n/a

Default Re: performance issues writing udf - 08-09-2010 , 09:18 AM



"datenwort" <sebastian.saemisch (AT) sowarent (DOT) de> wrote

Quote:
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.

Reply With Quote
  #5  
Old   
Helmut Tessarek
 
Posts: n/a

Default Re: performance issues writing udf - 08-09-2010 , 01:06 PM



Quote:
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.
*/

Reply With Quote
  #6  
Old   
Serge Rielau
 
Posts: n/a

Default Re: performance issues writing udf - 08-10-2010 , 01:09 AM



On 8/9/2010 10:18 PM, Mark A wrote:
Quote:
"datenwort"<sebastian.saemisch (AT) sowarent (DOT) de> wrote in message
news:a3eab89a-ba2e-4e45-bad6-433920717e9a (AT) f6g2000yqa (DOT) 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.


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

Reply With Quote
  #7  
Old   
--CELKO--
 
Posts: n/a

Default Re: performance issues writing udf - 08-10-2010 , 07:20 AM



Quote:
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?

Reply With Quote
  #8  
Old   
Serge Rielau
 
Posts: n/a

Default Re: performance issues writing udf - 08-10-2010 , 10:23 AM



On 8/10/2010 8:20 PM, --CELKO-- wrote:
Quote:
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

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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.