To:
Sent: Tuesday, January 13, 2009 7:17 PM
Subject: Re: Best way to do date sort
> This question, along with many possible answers has been
> discussed many times, so there's a wealth of information
> in the searchable archive.
>
> The short form is "it depends". Do yo
This question, along with many possible answers has been
discussed many times, so there's a wealth of information
in the searchable archive.
The short form is "it depends". Do you want to sort? In
that case storing a single field will cost you when sorting.
Store the coarsest granularity you can.
As far as I have encountered the best and simplest option is to use date
time as string (mmddHHmmss or mmdd) as per your requirement.
Prabin
toostep.com
On Tue, Jan 13, 2009 at 2:37 PM, Ganesh wrote:
> I am indexing and storing date time with minute resolution. I need to do
> date range
I am indexing and storing date time with minute resolution. I need to do
date range query and also do sorting on this field. I am having almost 30
million records spread across 20 database.
option1:
To index the date time as string
option2:
To index date, hour and minute separately as number.