Re: DELETE SQL too slow.

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Diogo Biazus <diogo(at)ikono(dot)com(dot)br>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: DELETE SQL too slow.
Date: 2002-09-03 14:24:36
Message-ID: 20020904002436.E19438@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Post EXPLAIN ANALYSE output please.

On Tue, Sep 03, 2002 at 11:24:38AM -0300, Diogo Biazus wrote:
> I'm having problems with delete commands in postgres. They are too slow.
> I'm trying to delete a set o 300 rows in table with 50000 rows with a
> simple command like:
>
> DELETE FROM table WHERE field1 = '4'
>
> When I run the explain it tells me that index_scan is being used. But to
> complete the delete it takes more than 30 minutes and the CPU use never
> rise above 10%. The server that runs postgres is a RedHat Linux 7.3 over
> a Pentium III 900 Mhz with 512 MB RAM
>
> Here's a part of my postgresql.conf:
>
> max_connections = 64
> sort_mem = 32168
> shared_buffers = 15200
> fsync = false
> enable_seqscan = false
> wal_buffers = 10
> wal_files = 10
> checkpoint_segments = 20
>
> --
> Diogo de Oliveira Biazus
> diogo(at)ikono(dot)com(dot)br
> Ikono Sistemas e Automação
> http://www.ikono.com.br
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Diogo Biazus 2002-09-03 14:24:38 DELETE SQL too slow.
Previous Message Martijn van Oosterhout 2002-09-03 14:23:51 Re: Call closed: Almost happy ending (from "Data files became huge with no apparent reason" thread)