Re: indexes

From: Isabelle Brette <isabelle(at)apartia(dot)fr>
To: Chris Ruprecht <chrup999(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: indexes
Date: 2002-02-06 09:50:20
Message-ID: 20020206095020.GA1124@aparima.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi again,

On Tue, Feb 05, 2002 at 11:50:52AM -0600, Chris Ruprecht wrote:
> Isabella,

Mh, it's Isabelle, thanks.

> I would do a
> create index sess_created on sessions (ip, to_char);
>
> This satisfies the where clause and might help in the group by.

This does not seem to work.

One thing or two I did not say in my previous post :

- the 'created' column is a timestamp, so the to_char function needs a
second argument to know which format to use.

- the 'ip' column is of postgres type inet, that's why I use the <<
operator.

- for some other queries, I also need a filter on IPs but not on the
timestamp.

For the ip thing, I just looked at the doc and it seems a '<<' operator
on inet columns just can't use an indexed column properly. All I can do
is simple comparisons such as <, <=, =, >=, > (only the btree access
method is implemented in my current version of Postgres : 7.1.3 ; will
this change in 7.2 ?).

--
Isabelle Brette - isabelle(at)apartia(dot)fr

In response to

  • Re: indexes at 2002-02-05 17:50:52 from Chris Ruprecht

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2002-02-06 15:29:56 Re: indexes
Previous Message Rudi 2002-02-05 22:49:05 Re: Database ownership