On 28 Sep 2011, at 3:48pm, Puneet Kishor wrote:

> Could I? Sure, if I had known better. Should I? I would be happy to create a 
> new column, convert the values to julian days, and try that, but on a 27 GB 
> db, that would take a bit of a while.

You only have to do it once, you can do it overnight, and you can pick which 
night you do it.  You can store them as INTEGER or REAL, which is far faster to 
search than TEXT.  And the alternative is to do some extra work every time 
someone uses that SELECT or anything like it.  It also means you can usefully 
put those columns in an INDEX.  Speeding up SELECTs is what INDEXes are all 
about.

What you have done is the equivalent of collecting all the knowledge of the 
world and putting it unsorted in a huge warehouse.  Every time anyone wants 
something they have to wade through, on average, half the warehouse before they 
find it.

> But, if I understood [http://www.sqlite.org/datatype3.html] correctly, there 
> really is no such thing as DATETIME value. Internally, it is stored as TEXT 
> anyway.

If you want to see what value is actually being stored just SELECT it without 
converting to Datatype and see what you get.

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

Reply via email to