On Fri, Sep 6, 2013 at 5:40 PM, Richard Hipp <d...@sqlite.org> wrote:
> On Fri, Sep 6, 2013 at 11:38 AM, Pepijn Van Eeckhoudt < > pep...@vaneeckhoudt.net> wrote: > > > In order to speed up the distance function I was wondering if I could > > use aux_data to cache the parsed version of the first parameter since > > this remains the same for every call. So far I haven't been able to get > > this to work though, aux_data is always NULL, no matter what I try. > > > > My hunch is that this is because the first parameter is the result of a > > function call which could in theory return different values for each row > > even if the input parameters are constant. Is that correct? > > > > Correct. Would be nice to be able to mark a function as "deterministic" and allow aux-data for such function results when called with constant arguments. In fact, such deterministic function calls with constant arguments could even be evaluated at "parse time", with their results used directly (inlined) in the VDBE, in theory. Just speculations from someone who does not understand SQLite's implementation. :) --DD _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users