title: What is the order of execution of a function in an sql query?
body: <p>If I build my own function "myfunction" and this query:</p>
  
  <pre><code>select
  myfunction(parameters)
  from
  mytable
  where
  a and b and c and d
  </code></pre>
  
  <p>if mytable has 1 million lines, but after my where I have only 100 lines.
  When I had executed this query, myfunction will be executed for 100 or 1 million lines?</p>
  
  <p>and in this case what happens?</p>
  
  <pre><code>select
  myfunction(parameters)
  from
  mytable
  where
  a and b and c and d and myfunction(parameters) == e
  </code></pre>