pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Qingqing Zhou <zhouqq@cs.toronto.edu>
To: pgsql-performance@postgresql.org
Subject: Re: it is always delete temp table will slow down the postmaster?
Date: Thu, 11 Aug 2005 14:37:20 +0800
Message-ID: <dderrg$f6a$1@news.hub.org> (raw)
References: <002001c59e26$11bc5bf0$a279640a@Beh>


""Chun Yit(Chronos)"" <ivanbeh@chronos.com.my> writes
>
>hi, i got one situation here, i create one pl/pgsql function that using
temp table to store temporary data.
>wherever i execute my function, i need to delete all the data inside the
temp table, but this will slow down the
>searching function if i conitnue to run the server because old tuples are
not really clear if just using delete command.
>so i use drop table command and recreate the table.

A better way to empty a table fast is "truncate table".

Regards,
Qingqing





view thread (3+ messages)  latest in thread

Message-ID: <dderrg$f6a$1@news.hub.org>
Permalink:  ../dderrg$f6a$1@news.hub.org/
Also on:    postgresql.org/message-id/dderrg$f6a$1@news.hub.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: zhouqq@cs.toronto.edu
  Subject: Re: it is always delete temp table will slow down the postmaster?
  In-Reply-To: <dderrg$f6a$1@news.hub.org>

* 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