Hello!

We have performance trouble with SQLite.
We have created custom function MY_FUNC(a TEXT, b TEXT) and bind it with 
sqlite3_create_function.
So, we have 2 tables:
Tbl1(id1 INTEGER, id2 INTEGER, str TEXT)  2 records
Tbl2(id INTEGER, Tbl1_id INTEGER, str TEXT) ~5000 records
And SQL-query: SELECT Tbl2.id, MY_FUNC(Tbl1.str, Tbl2.str) FROM Tbl2 JOIN Tbl1 
ON Tbl1.id1=Tbl2.Tbl1_id WHERE Tbl2.id>1000 AND Tbl1.id2=1 LIMIT 50
We expected that MY_FUNC would be evaluated 50 times at most, but it appeared 
10000!
Why so?
We using SQLite ver. 3.6.23.1

Sincerely Yours,
Smirnov Wadim Yurievich
System architector
Positive Technologies

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to