Lists: | pgsql-general |
---|
From: | "Abraham, Danny" <danny_abraham(at)bmc(dot)com> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Can postgres handle "group by" queries? |
Date: | 2007-12-31 15:07:55 |
Message-ID: | BE67D1149BBD5746984545ED91F702E0461C76@hou-ex-02.adprod.bmc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Hi,
The following query
SELECT START_DATE_IDX, COUNT(*)
FROM RUNINFO_HISTORY
WHERE START_DATE_IDX>=1005
group by START_DATE_IDX
runs for about 200s on Postgres, but 13s on MS SQL Server, on the same
machine.
The searched column is indexed.
By reading the "explain" you can tell that the index is being used.
Any idea?
Danny Abraham
BMC Software
CTM&D Business Unit
972-52-4286-513
danny_abraham(at)bmc(dot)com
From: | Raymond O'Donnell <rod(at)iol(dot)ie> |
---|---|
To: | "Abraham, Danny" <danny_abraham(at)bmc(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Can postgres handle "group by" queries? |
Date: | 2007-12-31 15:09:59 |
Message-ID: | 47790647.90104@iol.ie |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
On 31/12/2007 15:07, Abraham, Danny wrote:
> runs for about 200s on Postgres, but 13s on MS SQL Server, on the same
> machine.
> The searched column is indexed.
> By reading the "explain" you can tell that the index is being used.
Have you been running VACUUM on the table?
Ray.
---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
---------------------------------------------------------------