Re: [ADMIN] Problem with inserts from subselects

2004-04-23 Thread Tom Lane
Tyler Ward <[EMAIL PROTECTED]> writes: > I'm using postgres 7.3.x (the default installed on Fedora Core 1) and > I'm running into a serious > bug in the insert performance. Could we see EXPLAIN ANALYZE output from all three cases? I'd have expected "INSERT ... SELECT foo" to generate the same pl

Re: [ADMIN] Problem with inserts from subselects

2004-04-23 Thread banghe
Can you try in this way: INSERT INTO table_a (session, sent, data_row, direction_id, instrument, price, size) select tmp.session, tmp.sent, tmp.data_row, tmp.direction_id, i.id, tmp.price, tmp.size FROM table_b tmp INNER JOIN table_c i ON i.symbol_id = tmp.symbol_id AND i.route_id = tmp.rout

[ADMIN] Problem with inserts from subselects

2004-04-23 Thread Tyler Ward
I'm using postgres 7.3.x (the default installed on Fedora Core 1) and I'm running into a serious bug in the insert performance. When I try a query like this... INSERT INTO table_a (session, sent, data_row, direction_id, instrument, price, size) ( select tmp.session, tmp.sent, tmp.data_row