Re:Date parsing performance on iOS (NSDateformatter vs sqlite)
by willvarfar on Saturday September 07, 2013 @08:48AM
(#6344924)
Why convert each date with a select if they are putting it into the db anyway? Why not just let sqlite do the conversion as part of the insert statement?
[ Parent
| on HN ]
Re:Date parsing performance on iOS (NSDateformatter vs sqlite)
by MishraAnurag on Saturday September 07, 2013 @09:58AM
(#6345084)
That was to make a fair comparison between the two approaches since NSDateFormatter's dateFromString gives an NSDate, while SQLite was handing back an integer.
But you are right. In production, it makes more sense to let SQLite handle the conversion and insertion in the same statement.