Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.ms-sqlserver    |    Notorious Rube Goldberg contraption    |    19,505 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 18,062 of 19,505    |
|    Serge Rielau to --CELKO--    |
|    Re: IsDeterministic(), IsPrecise(), and     |
|    10 Jan 11 14:27:43    |
      0f8b62ba       XPost: microsoft.public.sqlserver.programming       From: srielau@ca.ibm.com              On 1/8/2011 12:35 AM, --CELKO-- wrote:       > I think this is another MS versus ANSI/ISO. In the SQL/PSM language       > one of the options in a CREATE FUNCTION is DETERMINISTIC. That means       > the optimizer can replace a call with the same arguments (parameters       > are the formal place holders; arguments are the actual values in a       > CALL) with a constant result.       >       > This is a handy thing since a good optimizer will look across the       > sessions invoking the function and turn it into a look-up table. A       > JOIN replaces re-computing math, temporal or string functions.       Some food for thought on the matter.       One of the things we at DB2 Dev. have learned the hard way is that       "DETERMINISTIC" and it's buddy "EXTERNAL ACTION" are really things that       the developer has to decide.       For example, if your function uses a random number to generate a file       which is later destroyed then, as far as the user is concerned the       function is both deterministic nor does it have external action.       It's all about the net-effect.              Anyway, requiring schema binding to have a deterministic routine makes       sense to me.              Cheers       Serge                     --       Serge Rielau       SQL Architect DB2 for LUW, IBM Toronto Lab       Blog: tinyurl.com/SQLTips4DB2       Wiki: tinyurl.com/Oracle2DB2Wiki       Twitter: srielau              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca