If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Delays between UDF invocations

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-12-03, 06:04
xmoravej xmoravej is offline
Registered User
 
Join Date: Nov 2003
Posts: 1
Red face Delays between UDF invocations

Hello,

I have written a Java UDF for DB2 and registered it using the following params:

CREATE FUNCTION WASG2.arsu_bit_value ( varchar(32) for bit data, integer ) RETURNS INTEGER EXTERNAL NAME 'ch.ips.g2.db2.ch.ips.g2.db2.ARSU_BIT_VALUE!arsu_b it_value'
LANGUAGE java PARAMETER STYLE db2general DETERMINISTIC NOT FENCED NOT NULL CALL NO SQL NO EXTERNAL ACTION SCRATCHPAD
NO FINAL CALL ALLOW PARALLEL NO DBINFO

Basically the function returns the value (0 or 1) of the specified bit in a bit array.

Example of usage:

-- returns all arsu rights that have the 254-th bit set to 1 (LIST is varchar(32) for bit data)

select * from arsu_list where ARSU_BIT_VALUE(LIST, 254)=1

The functions itself works fine and is relatively fast (<1ms per invocation), however, DB2 seems to "insert" approx. 170 ms delays in between individual method invocations. It is a simple select so what is DB2 is doing during this time?

DB2 is "DB2 v7.1.0.77" on AIX.

Thanks a lot,
Jan Moravec
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On