Re: [SQL] Simple delete takes hours

2005-03-07 Thread Lynwood Stewart
Another way to speed it up is to use bind variables. It sped my deletes up by a factor of 280/1. -- Lynwood "Thomas Mueller" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi there, > > I have a simple database: > > CREATE TABLE pwd_description ( > id SERIALNOT

Re: [SQL] Simple delete takes hours

2005-03-05 Thread Thomas Mueller
On 05.03.2005 00:24 PFC wrote: > Every time a row is removed from pwd_name, the ON DELETE CASCADE > trigger will look in pwd_name_rev if there is a row to delete... Does > it have an index on pwd_name_rev( rev_of ) ? If not you'll get a full > table scan for every row deleted in pwd_name...

Re: [SQL] Simple delete takes hours

2005-03-04 Thread PFC
Every time a row is removed from pwd_name, the ON DELETE CASCADE trigger will look in pwd_name_rev if there is a row to delete... Does it have an index on pwd_name_rev( rev_of ) ? If not you'll get a full table scan for every row deleted in pwd_name... On Thu, 03 Mar 2005 22:44:58 +0100, T

Re: [SQL] Simple delete takes hours

2005-03-04 Thread Stephan Szabo
On Thu, 3 Mar 2005, Thomas Mueller wrote: > Hi there, > > I have a simple database: > > CREATE TABLE pwd_description ( >id SERIALNOT NULL UNIQUE PRIMARY KEY, >name varchar(50) NOT NULL > ); > > CREATE TABLE pwd_name ( >id SERIALNOT NULL UNIQUE PR

[SQL] Simple delete takes hours

2005-03-04 Thread Thomas Mueller
Hi there, I have a simple database: CREATE TABLE pwd_description ( id SERIALNOT NULL UNIQUE PRIMARY KEY, name varchar(50) NOT NULL ); CREATE TABLE pwd_name ( id SERIALNOT NULL UNIQUE PRIMARY KEY, description integer NOT NULL REFERENCES pwd_descri