I have the following table:
CREATE TABLE mytmp (
CREATE INDEX idx_mytmp ON mytmp(adv, pub, web);
And with 16M rows this query:
SELECT adv, pub, web, country, date_trunc('hour', tiempo), sum(num)
FROM mytmp GROUP BY adv, pub, web, country, date_trunc('hour', tiempo)
I've tried to create index in different columns but it seems that the group
by clause doesn't use the index in any way.
Is around there any stuff to accelerate the group by kind of clauses?
Thanks a lot.
pgsql-performance by date
|Next:||From: James Klo||Date: 2005-12-19 19:10:50|
|Subject: Re: make bulk deletes faster?|
|Previous:||From: Luke Lonergan||Date: 2005-12-19 17:30:21|
|Subject: Re: PostgreSQL and Ultrasparc T1|