List:General Discussion« Previous MessageNext Message »
From:(Hal Date:October 8 2011 8:39pm
Subject:optimizer in function
View as plain text  
Does the optimizer look into function called from query?

In my queries the expression (SELECT hwyl FROM Stock) / (SELECT regularPayment FROM
Stock), where Stock is a one-record table, often is repeated. The optimizer sees that,
and makes the ratio a constant, and I can afford to be clear. If that expression were
within a function called from the same spot, would the optimizer look into the function
and see the same effectiv constant? or is it better to make it an argument to the

optimizer in functionhsv9 Oct
  • Re: optimizer in functionMichael Dykman9 Oct