Re: query should use an index?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bopolissimus Platypus <bopolissimus(at)sni(dot)ph>, pgsql-general(at)postgresql(dot)org
Subject: Re: query should use an index?
Date: 2004-01-10 09:57:25
Message-ID: 200401101057.25325.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bopolissimus Platypus wrote:
> create table test (
> id serial primary key,
> t_end timestamp);
>
> there's an index:
> create index test_t_end on test(t_end);
>
> can or should a query like:
>
> select login,t_end from test order by t_end desc;
>
> use the index?

It can, but that does not mean that it is unconditionally the best
choice. The planner will make the decision.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Brown 2004-01-10 12:36:06 Re: psql \d option list overloaded
Previous Message Bopolissimus Platypus 2004-01-10 08:26:22 query should use an index?