Re: [PERFORM] Query Performance with Indexes on Integer type vs. Date type.

2011-04-27 Thread Dhimant Patel
Thanks for all valuable insights. I decided to drop the idea of adding additional column and will just rely on Date column for all ordering. Tom - thanks for clear answer on the issue I was concerned about. Maciek,Kevin - thanks for ideas, hint on generate_series() - I will have to go through cpl

Re: [PERFORM] Query Performance with Indexes on Integer type vs. Date type.

2011-04-27 Thread Phoenix Kiula
On Thu, Apr 28, 2011 at 12:17 AM, Kevin Grittner wrote: > > Dhimant Patel wrote: > > > I am a new comer on postgres world and now using it for some > > serious (at least for me)  projects. I have a need where I am > > running some analytical + aggregate functions on data where > > ordering is don

Re: [PERFORM] Query Performance with Indexes on Integer type vs. Date type.

2011-04-27 Thread Kevin Grittner
Dhimant Patel wrote: > I am a new comer on postgres world and now using it for some > serious (at least for me) projects. I have a need where I am > running some analytical + aggregate functions on data where > ordering is done on Date type column. > > From my initial read on documentation I b

Re: [PERFORM] Query Performance with Indexes on Integer type vs. Date type.

2011-04-27 Thread Maciek Sakrejda
> This makes me wonder would it make any good to create additional column of > Integer type and update it as data gets added and use this integer column for > all ordering purposes for my sqls - or should I not hasitate using Date type > straight into my sql for ordering? Keep in mind what Mic

Re: [PERFORM] Query Performance with Indexes on Integer type vs. Date type.

2011-04-27 Thread Tom Lane
Dhimant Patel writes: > From my initial read on documentation I believe internally a date type is > represented by integer type of data. This makes me wonder would it make any > good to create additional column of Integer type and update it as data gets > added and use this integer column for all

[PERFORM] Query Performance with Indexes on Integer type vs. Date type.

2011-04-27 Thread Dhimant Patel
Hi All, I am a new comer on postgres world and now using it for some serious (at least for me) projects. I have a need where I am running some analytical + aggregate functions on data where ordering is done on Date type column. >From my initial read on documentation I believe internally a date t