Re: Extremely Slow Cascade Delete Operation

From: Yan Cheng Cheok <yccheok(at)yahoo(dot)com>
To: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Extremely Slow Cascade Delete Operation
Date: 2010-01-13 08:47:44
Message-ID: 819416.78075.qm@web65714.mail.ac4.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

SemiconductorInspection=# \dt+
List of relations
Schema | Name | Type | Owner | Size | Description
--------+------------------+-------+----------+------------+-------------
public | lot | table | postgres | 8192 bytes |
public | measurement | table | postgres | 529 MB |
public | measurement_type | table | postgres | 8192 bytes |
public | measurement_unit | table | postgres | 8192 bytes |
public | unit | table | postgres | 57 MB |
(5 rows)

I can see the PostgreSQL process is occupy CPU. But how come it takes so long? There are only 1000++ row of unit, where their lot_id is 2.

Seems not reasonable to me. :(

Thanks and Regards
Yan Cheng CHEOK

--- On Wed, 1/13/10, Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com> wrote:

> From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
> Subject: Re: [GENERAL] Extremely Slow Cascade Delete Operation
> To: "Yan Cheng Cheok" <yccheok(at)yahoo(dot)com>
> Cc: pgsql-general(at)postgresql(dot)org
> Date: Wednesday, January 13, 2010, 4:35 PM
> It doesn't look like it is locked, so
> it is carrying the delete out.
> However that doesn't mean, that there isn't any other
> locking
> occurring, or simply your disks are rather busy.
>
> Also, maybe the DB is rather big, what are the table sizes
> ?
> If you are using 8.4+, than do \dt+ to get an idea,
> otherwise SELECT
> pg_size_pretty(pg_total_relation_size('table_name')); for
> each table.
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tino Wildenhain 2010-01-13 09:29:05 Re: Is It Good Practice That I use TableName-Month-Year Convention
Previous Message Grzegorz Jaśkiewicz 2010-01-13 08:35:43 Re: Extremely Slow Cascade Delete Operation