pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Vilson farias <vilson.farias@digitro.com.br>
Cc: pgsql-admin@postgresql.org
Subject: Re: Deleting large amount of data.
Date: Mon, 26 Aug 2002 12:49:27 -0700 (PDT)
Message-ID: <20020826124628.C64199-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <00ee01c24d36$7246a3c0$98a0a8c0@dgtac>

On Mon, 26 Aug 2002, Vilson farias wrote:

> Greetings,
>
>     I'm having some perfomance problems related with large amount of
> tuples in a table, so I decided to start programming some shell
> scripts to be placed in crontad to remove old data every night.

Hmm, you might want to send some info on the schema/queries/explain
output, maybe someone'll be able to help.

>
>    Now, my questions are :
>
>   If I just execute a DELETE * FROM WHERE call_start < '2002-08-21'
> and call_start > '2002-08-20', and that interval has 100.000 tuples,
> does DELETE start and commit a transaction for every single deletion?

No.  It's all one statement, so it'll be in its containing transaction (if
you haven't started one, it'll be put into its own).




view thread (4+ messages)  latest in thread

Message-ID: <20020826124628.C64199-100000@megazone23.bigpanda.com>
Permalink:  ../20020826124628.C64199-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20020826124628.C64199-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, vilson.farias@digitro.com.br
  Subject: Re: Deleting large amount of data.
  In-Reply-To: <20020826124628.C64199-100000@megazone23.bigpanda.com>
  References: <00ee01c24d36$7246a3c0$98a0a8c0@dgtac> <20020826124628.C64199-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox