Re: having indexes when clearing tables

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: nuno <wegein(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: having indexes when clearing tables
Date: 2006-07-11 15:44:31
Message-ID: b42b73150607110844qef8bdbdh2800527cd032b6aa@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

try truncate. just be aware that truncate is being upgraded in 8.2
for better handling of foreign key isues.

merlin

On 9 Jul 2006 20:35:39 -0700, nuno <wegein(at)gmail(dot)com> wrote:
> hi there.
>
> i'm trying to clear data in a table but somehow it takes way too much
> time than i once expected (i'm using the formal 'delete from xxx' type
> of query.).
>
> this table's got several foreign keys and i suspect that is why it
> takes longer than expected.
>
> my question is that
> would having indexes increase query performance when clearing tables?
> or could anyone suggest me any ways to increase performance of the
> query in such cases?
>
> thanks very much.
>
> regards, nuno

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2006-07-11 15:45:31 Re: Notes on converting from MySQL 5.0.x to PostgreSQL
Previous Message lynnsettle@yahoo.com 2006-07-11 15:43:17 Re: customizing pg_dump together with copy.c's DoCopy function