Re: Slow query and indexes...

From: Jim Nasby <decibel(at)decibel(dot)org>
To: Jonas Henriksen <jonas(dot)f(dot)henriksen(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Slow query and indexes...
Date: 2007-05-07 15:44:35
Message-ID: 92B150E6-C210-4797-B407-88B66A55ACD7@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On May 7, 2007, at 8:53 AM, Jonas Henriksen wrote:
> while if I add a GROUP BY data_logger the query uses a seq scan and a
> lot of time:
>>> explain analyze SELECT max(date_time) FROM data_values GROUP BY
> data_logger_id;

What do you get if you run that with SET enable_seqscan = off; ?
--
Jim Nasby jim(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jonas Henriksen 2007-05-07 15:47:08 Re: Slow query and indexes...
Previous Message Jim Nasby 2007-05-07 15:42:17 Re: shmget fails on OS X with proper settings