TEMP TABLE USING PROBLEM

From: Olcsák József <olcsak(dot)jozsef(at)ritek(dot)hu>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: TEMP TABLE USING PROBLEM
Date: 2002-08-02 07:19:54
Message-ID: 000801c239f5$00f32260$3c14a8c0@ritek.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi all!

I have a little problem, when using a temp table ....

explain UPDATE cim SET os_cim_id=-1 FROM T_CNY WHERE cim.cim_id=T_CNY.cim_id;
NOTICE: QUERY PLAN:

Hash Join (cost=26986.59..44340.35 rows=243969 width=129)
-> Seq Scan on t_cny (cost=0.00..3635.69 rows=243969 width=4)
-> Hash (cost=5961.65..5961.65 rows=254965 width=125)
-> Seq Scan on cim (cost=0.00..5961.65 rows=254965 width=125)

In this case t_cny is a temp table and update runs very very slow ...

After I copied t_cny a real table named tcny :

select * into tcny from t_cny;

explain UPDATE cim SET os_cim_id=-1 FROM TCNY WHERE cim.cim_id=TCNY.cim_id;

NOTICE: QUERY PLAN:

Nested Loop (cost=0.00..3321.34 rows=1000 width=129)
-> Seq Scan on tcny (cost=0.00..20.00 rows=1000 width=4)
-> Index Scan using pk_cim on cim (cost=0.00..3.29 rows=1 width=125)


Postgres's query optimizer does not determine a temp table field information ???

Browse pgsql-bugs by date

  From Date Subject
Next Message Anders Hammarquist 2002-08-02 10:34:06 Re: Bug #728: Interactions between bytea and character encoding when doing analyze
Previous Message Warren W. Gay VE3WWG 2002-08-01 16:52:55 Case bug in SQL Constraint