As I see it,from the point of view of just retrieving the last row from a table, no ORDER BY is necessary thus saving processor time.
________________________________ From: Nicolas Williams <nicolas.willi...@oracle.com> To: General Discussion of SQLite Database <sqlite-users@sqlite.org> Sent: Sat, January 29, 2011 10:51:30 PM Subject: Re: [sqlite] LAST() function not supported On Sat, Jan 29, 2011 at 12:38:37PM -0800, Marian Cascaval wrote: > Hi! > > Is LAST() function going to be supported? > > Or will the "SELECT ... FROM ... ORDER BY ... DESC LIMIT 1" workaround always >be > > enough? > > My concern is if there might be any speed improvement if LAST() function were >to > > be implemented, comparing to the workaround. Use EXPLAIN QUERY PLAN... If there's enough indices to satisfy all the ORDER BY expressions then how could a "last()" function do any better? For that matter, if there aren't enough indices to satisfy all the ORDER BY expressions then how could a "last()" function do any better? What optimization could such a function implement that the query optimizer couldn't? Syntactically speaking, there's no additional information in "last()" -- it's just syntactic sugar. Nico -- _______________________________________________ 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