Re: Nested Loop

From: "Gauri Kanekar" <meetgaurikanekar(at)gmail(dot)com>
To: Ragnar <gnari(at)hive(dot)is>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Nested Loop
Date: 2007-03-27 10:43:31
Message-ID: 7e4ba9550703270343o4dadf1c0sdcf9f06eba64ed00@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,

here is the query

SELECT rs.id AS sid, rs.name AS sname, rc.id AS campid, rc.name AS campname,
rc.rev_type AS revtype, rc.act_type AS actntype, ra.id AS advid, ra.name AS
advname, rpt_chn.id AS chanid, rpt_chn.name AS channame, rpt_cre.dn AS dn,
SUM(rm.imdel) AS impression, SUM(rm.cdel) AS click, rd.sqldate AS date FROM
rm, rn CROSS JOIN rd, ra, rs, rc, rpt_chn, rpt_cre WHERE rm.date_key =
rd.key AND rm.net_key = rn.key AND rm.adv_key = ra.key AND rm.camp_key =
rc.key AND rm.s_key = rs.key AND rm.chn_key = rpt_chn.key AND rm.cre_key =
rpt_cre.key AND ra.name != 'SYSTEM' AND rd.sqldate BETWEEN '12/1/2006' AND
'12/30/2006' AND ( rn.id IN ( 607 ) ) GROUP BY rd.sqldate, rs.id, rs.name,
ra.id, ra.name, rc.id, rc.name, rc.rev_type, rc.act_type, rpt_chn.id,
rpt_chn.name, rpt_cre.dn;

On 3/26/07, Ragnar <gnari(at)hive(dot)is> wrote:
>
> On mán, 2007-03-26 at 20:33 +0530, Gauri Kanekar wrote:
>
> you did not show your query, nor did you answer whather you had vacuumed
> and analyzed.
>
> > enable_seqscan = off
>
> why this? this is unlikely to help
>
>
> >
> > QUERY PLAN
> > ...
> > -> Nested Loop
> > (cost=0.00..1104714.83 rows=6801 width=44) (actual
> > time=1820.153..229779.814 rows=10945938 loops=1)
>
> the estimates are way off here. you sure you have analyzed?
>
> gnari
>
> >
>
>

--
Regards
Gauri

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Ragnar 2007-03-27 11:47:13 Re: Nested Loop
Previous Message Tom Lane 2007-03-27 03:37:18 Re: [GENERAL] ERROR: out of shared memory