Can this be indexed? - Mailing list pgsql-general

From Net Virtual Mailing Lists
Subject Can this be indexed?
Date
Msg-id 20041106143401.45@mail.net-virtual.com
Whole thread Raw
Responses Re: Can this be indexed?
Re: Can this be indexed?
List pgsql-general
Is there a way to create an index that would make this query be efficient
and not perform a sequential scan?

SELECT count(*) AS count,id FROM sometable GROUP BY id;

.. I've considered creating a rule on this table which would put the
results of this into another table anytime it is updated, but I thought
there might be an easier way.

Thanks!

- Greg


pgsql-general by date:

Previous
From: Alvaro Herrera Munoz
Date:
Subject: Re: Gborg down?
Next
From: "Ed L."
Date:
Subject: Re: Can this be indexed?