Re: index on two tables or Howto speedup max/aggregate-function

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: Michael Schwipps <msc(dot)listen(at)online(dot)de>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: index on two tables or Howto speedup max/aggregate-function
Date: 2009-10-13 09:20:49
Message-ID: 2f4958ff0910130220g37dbd38fib624be8580c4d336@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Oct 13, 2009 at 9:59 AM, Michael Schwipps <msc(dot)listen(at)online(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jacques Caron 2009-10-13 10:10:15 Re: index on two tables or Howto speedup max/aggregate-function
Previous Message Michael Schwipps 2009-10-13 08:59:03 index on two tables or Howto speedup max/aggregate-function