On Nov 2, 2012, at 5:49 AM, Tim Hankins <[email protected]<mailto:[email protected]>> wrote:
Can anyone comment on whether these times are expected, and if not, suggest how I might optimize things in order to get better performance? I’ve found that date/time parsing is slow on all platforms, and can be a performance bottleneck. It’s best if you can avoid it. The usual workaround in CouchDB is to store dates in a format that sorts properly with plain string collation, i.e. some type of “YYYY-MM-DD HH:MM:SS” style. Then there’s no need to parse dates to compare them, you just compare strings. An alternative is to store dates as numeric timestamps (e.g. seconds since an epoch). This can be even faster, and lets you quickly do computations like the time between two dates, but a lot of people dislike it because it’s not human-readable. —Jens
