× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks for posting this Michael. It goes to prove little performance tuning
can go a long way.

As for the difference between UDF & inline code, I knew there is some
overhead to call a UDF but it's hard to quantify without benchmarks. Some
of it can be eased by choosing certain CREATE FUNCTION arguments carefully.
See page 4 of this Centerfield newsletter for an example:

http://www.centerfieldtechnology.com/publications/archive/Oct%202006.pdf

Bottom line is that going through 56M records in 2 seconds is pretty darn
good. Way to go DB2 for i5/OS!

Elvis

Celebrating 10-Years of SQL Performance Excellence on IBM i5/OS and OS/400
http://centerfieldtechnology.com/training.asp


-----Original Message-----
Subject: Re: SQL Date Math

That was interesting. Here are the results.

All run in interactive SQL, approximately 56M records. Index built
over the numeric field (which took a freaking long time btw - like 10
minutes).

Using CvtDateToNumISO function with no index - 45 seconds
Using function code with no index - 38 seconds
Using CvtDateToNumISO function with index - 11 seconds
Using function code with index - 2 seconds


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.