Re: [SQL] index for group by

2008-07-22 Thread Steve Midgley
At 09:20 AM 7/22/2008, [EMAIL PROTECTED] wrote: Date: Tue, 22 Jul 2008 13:27:24 +0200 From: "A. Kretschmer" <[EMAIL PROTECTED]> To: pgsql-sql@postgresql.org Subject: Re: index for group by Message-ID: <[EMAIL PROTECTED]> am Tue, dem 22.07.2008, um 13:18:30 +0200 mailte Patrick Scharrenberg fol

Re: [SQL] index for group by

2008-07-22 Thread A. Kretschmer
am Tue, dem 22.07.2008, um 13:18:30 +0200 mailte Patrick Scharrenberg folgendes: > Hi, > > is there a way to speedup "group by" queries with an index? > > In particular if I have a table like this: > > CREATE TABLE data > ( >id1 integer, >id2 integer, >somedata character varying, >

[SQL] index for group by

2008-07-22 Thread Patrick Scharrenberg
Hi, is there a way to speedup "group by" queries with an index? In particular if I have a table like this: CREATE TABLE data ( id1 integer, id2 integer, somedata character varying, ts timestamp with time zone ); where continously data is logged about "id1" and "id2" into "somedata",