[SQL] cascade delete

2004-02-11 Thread sad
hi why a cascade delete is so slow ? pgsql 7.3.3 ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the m

Re: [SQL] 7.4 - FK constraint performance

2004-02-11 Thread Tom Lane
ow <[EMAIL PROTECTED]> writes: > When I try to delete record, it takes > 3 min. Why is it taking so long if > practically the same select query (see (2)) is running very quickly. Anything > that can be done to fix it? What are those column datatypes? regards, tom lane --

Re: [SQL] 7.4 - FK constraint performance

2004-02-11 Thread Stephan Szabo
On Wed, 11 Feb 2004, ow wrote: > PostgreSQL 7.4 on i386-linux-gnu, compiled by GCC 2.96 > > -- about 10 records > CREATE TABLE my.Small > ( > id my.dint NOT NULL, > code my.dvalue NOT NULL, > CONSTRAINT pk_1 PRIMARY KEY (id), > ) WITHOUT OIDS; > > -- about 80M rows > CREATE TABLE my.Large >

[SQL] 7.4 - FK constraint performance

2004-02-11 Thread ow
PostgreSQL 7.4 on i386-linux-gnu, compiled by GCC 2.96 -- about 10 records CREATE TABLE my.Small ( id my.dint NOT NULL, code my.dvalue NOT NULL, CONSTRAINT pk_1 PRIMARY KEY (id), ) WITHOUT OIDS; -- about 80M rows CREATE TABLE my.Large ( id my.dlong NOT NULL, small_id my.dint NOT NULL,

Re: [SQL] Multiple outer join on same table

2004-02-11 Thread Markus Bertheau
On ÐÐÐ, 2004-02-09 at 19:12 +0100, Marco Lazzeri wrote: > Hi! > I'm searching a better (quicker) way to retrieve data as I used to do > using the following query... > > == > SELECT > main.codice, > other.value AS value_one, > other.value AS value_two > FROM main LEFT OUTER JOIN other