Re: [PERFORM] How to create an index for type timestamp column using rtree?

2004-07-13 Thread Tom Lane
Chris Cheston [EMAIL PROTECTED] writes:
 I'm storing some timestamps as integers (UTF) in a table and I want to
 query by = and = for times between a certain period.

btree can handle range queries nicely; why do you think you need an
rtree?  rtree is for 2-dimensional datums which a timestamp is not ...

regards, tom lane

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [PERFORM] How to create an index for type timestamp column using

2004-07-13 Thread Christopher Kings-Lynne
I'm storing some timestamps as integers (UTF) in a table and I want to
query by = and = for times between a certain period.  The table has
gotten quite large and is now very slow in querying.
I think it's time to create an index for the timestamp column.
Uh, yeah.
I tried using an rtree (for = and = optimization):
Bad idea.
Do I have to create an rtree type for my timestamp integer column?  
Why do you want an rtree index?  They're for multidimensional polygonal 
data and stuff.  Just create a normal index...

Chris
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [PERFORM] How to create an index for type timestamp column using rtree?

2004-07-13 Thread Chris Cheston
Thanks,  Chris and Tom.
I had read *incorrectly* that rtrees are better for = and = comparisons.

Chris

On Tue, 13 Jul 2004 14:33:48 +0800, Christopher Kings-Lynne
[EMAIL PROTECTED] wrote:
  I'm storing some timestamps as integers (UTF) in a table and I want to
  query by = and = for times between a certain period.  The table has
  gotten quite large and is now very slow in querying.
 
  I think it's time to create an index for the timestamp column.
 
 Uh, yeah.
 
  I tried using an rtree (for = and = optimization):
 
 Bad idea.
 
  Do I have to create an rtree type for my timestamp integer column?
 
 Why do you want an rtree index?  They're for multidimensional polygonal
 data and stuff.  Just create a normal index...
 
 Chris
 


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]