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                                            [EMAIL PROTECTED]
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org/

Reply via email to