Re: [sqlite] User function calculates for every row before applying any where condition

2011-04-11 Thread Dan Kennedy
On 04/11/2011 05:32 PM, Enrico Thierbach wrote: > > On 11.04.2011, at 10:18, Maxim V. Shiyanovsky wrote: > >> Does SQlite (3.6.23.1 to be precise) perform any optimization when user >> function appears in the statement? >> >> I defined custom function MY_FUNC(a TEXT, b TEXT) and bound it with >>

Re: [sqlite] User function calculates for every row before applying any where condition

2011-04-11 Thread Enrico Thierbach
On 11.04.2011, at 10:18, Maxim V. Shiyanovsky wrote: > Does SQlite (3.6.23.1 to be precise) perform any optimization when user > function appears in the statement? > > I defined custom function MY_FUNC(a TEXT, b TEXT) and bound it with > sqlite3_create_function. > > Suppose, we have 2 tables:

[sqlite] User function calculates for every row before applying any where condition

2011-04-11 Thread Maxim V. Shiyanovsky
Does SQlite (3.6.23.1 to be precise) perform any optimization when user function appears in the statement? I defined custom function MY_FUNC(a TEXT, b TEXT) and bound it with sqlite3_create_function. Suppose, we have 2 tables: Tbl1(id1 INTEGER, id2 INTEGER, str TEXT) with 2 records Tbl2(id INT