BUG #6348: PROBLEMAS DELETE - Mailing list pgsql-bugs

From wilsoncamago@gmail.com
Subject BUG #6348: PROBLEMAS DELETE
Date
Msg-id E1RdN7v-0005FK-SG@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #6348: PROBLEMAS DELETE  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      6348
Logged by:          wilson camargo
Email address:      wilsoncamago@gmail.com
PostgreSQL version: 9.1.2
Operating system:   win linux
Description:=20=20=20=20=20=20=20=20

hace algun tiempo tube el inconveniente de eliminar de una tabla relacionada
en una subconsulta y eliminando 10000 aprox se demoraba 20 seg la consulta
era=20
DELETE FROM  saldo_detalle_cartera=20
WHERE saldo_detalle_cartera.movimiento_contable in (select
s.movimiento_contable from saldo_detalle_cartera s=20
                             inner join movimiento_contable m on
m.id_mov_contable=3D s.movimiento_contable
                             and m.proyecto =3D '185' )

afotunadamente hay una forma mas rapida que es usando esta sentencia

DELETE FROM  saldo_detalle_cartera USING movimiento_contable m
WHERE saldo_detalle_cartera.movimiento_contable =3D m.id_mov_contable and
m.proyecto=3D'185'

la cual lo hace en tan solo 11 ms=20
la pregunta es podria hacer algo paracecido usando UDATE con tablas
relacionales=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20

pgsql-bugs by date:

Previous
From: cmjnov92@gmail.com
Date:
Subject: BUG #6349: Cannot install on 32 bit platform
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #6348: PROBLEMAS DELETE