Re: index on two tables or Howto speedup max/aggregate-function - Mailing list pgsql-performance

From Grzegorz Jaśkiewicz
Subject Re: index on two tables or Howto speedup max/aggregate-function
Date
Msg-id 2f4958ff0910130220g37dbd38fib624be8580c4d336@mail.gmail.com
Whole thread Raw
In response to index on two tables or Howto speedup max/aggregate-function  (Michael Schwipps <msc.listen@online.de>)
List pgsql-performance


On Tue, Oct 13, 2009 at 9:59 AM, Michael Schwipps <msc.listen@online.de> wrote:
Hi,

I want to select the last contact of person via mail.
My sample database is build with the following shell-commands

| createdb -U postgres test2
| psql -U postgres test2 < mail_db.sql
| mailtest.sh | psql -U postgres

I call to get the answer

| SELECT address, max(sent) from mail inner join
| tomail on (mail.id=tomail.mail) group by address;

you are missing vacuumdb -z test2
after mailtest.sh ..
 



--
GJ

pgsql-performance by date:

Previous
From: Jacques Caron
Date:
Subject: Re: index on two tables or Howto speedup max/aggregate-function
Next
From: Kenneth Marshall
Date:
Subject: Re: Are folks running 8.4 in production environments? and 8.4 and slon 1.2?