mercredi 8 avril 2015

sqlite select by date C#

Is this the preferred/fastest way to select values after a certain date from a database:



SELECT name, creationDate FROM sometable WHERE date(creationDate) >= date('_date_in_sqlite_format_')


where creationDate is DATETIME DEFAULT CURRENT_TIMESTAMP type and _date_in_sqlite_format_ is '2007-01-01 10:00:00' for example.


Is there a better way that can help sqlite engine process data faster?


The question is theoretical. I am aware that the query is not parameterized and/or follows more optimized programming conventions.


Aucun commentaire:

Enregistrer un commentaire