Re: Materializing a sequential scan

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Steinar H(dot) Gunderson" <sgunderson(at)bigfoot(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Materializing a sequential scan
Date: 2005-10-20 04:58:51
Message-ID: 4452.1129784331@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Steinar H. Gunderson" <sgunderson(at)bigfoot(dot)com> writes:
> BEGIN
> INSERT INTO kortsys2.mdb_gruppekobling_temp
> SELECT overgruppe_id,undergruppe_id FROM gruppekobling gk
> JOIN gruppe g1 ON gk.overgruppe_id=g1.gruppe_id
> JOIN gruppe g2 ON gk.overgruppe_id=g2.gruppe_id
> WHERE g1.aktiv AND g2.aktiv;
> LOOP

BTW, it sure looks like that second JOIN ought to be
JOIN gruppe g2 ON gk.undergruppe_id=g2.gruppe_id

As-is, it's not doing anything for you ... certainly not enforcing
that the undergruppe_id be aktiv.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Nörder-Tuitje 2005-10-20 07:15:17 Re: Inefficient escape codes.
Previous Message Tom Lane 2005-10-20 04:37:25 Re: Materializing a sequential scan