Heh, what's this?

From: Karl Denninger <karl(at)mcs(dot)net>
To: hackers(at)postgresql(dot)org
Subject: Heh, what's this?
Date: 1998-03-09 19:23:54
Message-ID: 19980309132354.23502@mcs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


The following query returns:

explain update user set inter = person.inter where person.custid = user.custid;

NOTICE: QUERY PLAN:

Nested Loop (cost=1095.16 size=1 width=370)
-> Seq Scan on person (cost=1095.16 size=16035 width=8)
-> Seq Scan on user (cost=0.00 size=0 width=362)

EXPLAIN

Uh, this is a problem.

Both person and user have an index on "custid". 6.2.1 used to utilize them.

You have to do a sequential scan on user, but NOT on person to perform
this update.

--
--
Karl Denninger (karl(at)MCS(dot)Net)| MCSNet - Serving Chicagoland and Wisconsin
http://www.mcs.net/ | T1's from $600 monthly to FULL DS-3 Service
| NEW! K56Flex support on ALL modems
Voice: [+1 312 803-MCS1 x219]| EXCLUSIVE NEW FEATURE ON ALL PERSONAL ACCOUNTS
Fax: [+1 312 803-4929] | *SPAMBLOCK* Technology now included at no cost

Browse pgsql-hackers by date

  From Date Subject
Next Message Maarten Boekhold 1998-03-09 20:27:05 Re: [HACKERS] Re: [QUESTIONS] Testing Postgresql v6.3
Previous Message Maurice Gittens 1998-03-09 18:52:21 Re: [HACKERS] newoid in invapi.c