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 > UDF in SQL and access paths

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-09-04, 11:43
mirkoV mirkoV is offline
Registered User
 
Join Date: Nov 2004
Posts: 2
UDF in SQL and access paths

hi,

can anyone tell me in what way the output of my UDF needs to be defined in order to guarantee usage of a logical file on a packed decimal ?

even if I add ZONED(UDF(), 8) around my function, my queries simply refuse to take advantage of the logical in which the packed decimal appears in the first position of the key.

thus, a query showing 'WHERE DTAV = 20041109' uses the logical and returns data within seconds. whereas 'WHERE DTAV = TODAY_8NUM()' will perform a full scan on millions of rows !

please help!
thanks,
mirko
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