Agreed - also some functions might not be intrinsically deterministic, but it may well be so for the duration of a query. There may
need to be some thinking on this.
I refer back to a discussion earlier (and subsequent SQLite adaption) which made a date-time reference deterministic within a single
query for transactional integrity. Similarly if one was to add a function which returns a date-dependant value, such as
'dayOfWeek(x)' and mark it as deterministic for inside a single query, that would make sense, even though it would be very
indeterministic (or referentially opaque, if you will) between queries. This is all dandy unless you have queries (as seen on this
forum) that run for three days or more... would it matter then?
I for one would very much like the ability to specify added functions as deterministic or not (or whatever term would indicate
'cacheability of the result') as this might be an enormous efficiency improvement in itself, and also allow you to now add things to
improve speed in some standard queries. Think of the people who have queries running for ages and can add a function to replace an
SQL function to improve it many times for the specific purpose.*
Actually, thinking about it, this was always achievable with some clever programming and managing the result cache yourself - but I
still think this addition would be an improvement.
That's my 2 cents.
Have a great day all!
Ryan
*This is not to say the SQL way is not good, but it often has to cater for a wide variety of things where a user-added function
might be very tuned to a specific purpose - ridding a lot of CPU-time fat.
On 2013/11/24 16:30, Petite Abeille wrote:
On Nov 24, 2013, at 3:17 PM, Doug Currie <doug.cur...@gmail.com> wrote:
There is value in compatibility, but those adjectives are awful.
FWIW, DETERMINISTIC is what Oracle uses:
http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/function.htm#LNPLS1183
I would personally stick to that if such functionality was ever introduced in
SQLite.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users