Re: Cannot Delete

From: Alex <alex(at)meerkatsoft(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: Cannot Delete
Date: 2003-10-13 05:54:20
Message-ID: 3F8A3E0C.1010808@meerkatsoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I still have this problem...
my table currently only has 60k records. it has two foreign keys . one
to a table with
15 records the other to a table with 250 records both with a primary key
as suggested.
the table itself is referenced by another table.

although I have about 10mio records in other tables , this one is rather
small... still i manage to delete 2-3 records / second.
I tried vacuum, the db and tables and did not gain any performance.

I experience this problem on different machines and yet, when i reload
the date it did speed up things considerably.

Any suggestions what could be wrong? Maybe a configuration issue ?

Thanks
Alex

Tom Lane wrote:

>Alex <alex(at)meerkatsoft(dot)com> writes:
>
>>hi have a table with 2.5 million records which i try do delete. i have
>>several constraints on it too.
>>i tried to delete the records using delete but it does not seem to work.
>>the delete runs forever. hrs...
>>i cannot truncate it as it complains about foreign keys.
>>
>
>It's a good bet that you need to create indexes on the columns that
>reference this table via foreign keys. Without such indexes, updates
>and deletes on the referenced table will be really slow.
>
> regards, tom lane
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2003-10-13 06:21:47 Re: Cannot Delete
Previous Message pginfo 2003-10-13 05:01:26 Re: go for a script! / ex: PostgreSQL vs. MySQL