Very long running query

From: elwood(at)agouros(dot)de (Konstantinos Agouros)
To: pgsql-general(at)postgresql(dot)org
Subject: Very long running query
Date: 2001-04-10 09:15:29
Message-ID: elwood.986893616@news.agouros.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have a query running for 97hours now and I am wondering if this can be made
any faster.
The Query is:
insert into dailyreport select timestamp(date '1-8-2001'),a.category,'Observed',sum(b.count) as count from websensebycat a, netscapereduce b where a.url = b.url and a.action='Observed' and a.datum='1-8-2001' and b.datum='1-8-2001' and not exists (select url from urlcounts where urlcounts.url=b.url) group by a.category;

The tables websensebycat and netscapereduce do have indices on it.
Netscapereduce has 60020 entries and websensebycat has around 6000 entries.
Urlcounts has 55 entries. The whole thing is running postgres 7.1RC2.
Anybody has a tip to accelerate this. The whole thing is running on a E250 with
64Bit Solaris7.

Konstantin
--
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: elwood(at)agouros(dot)de
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
----------------------------------------------------------------------------
"Captain, this ship will not sustain the forming of the cosmos." B'Elana Torres

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joseph 2001-04-10 10:29:15 perl dbi:pg
Previous Message Trewern, Ben 2001-04-10 08:17:32 RE: Have a question