Thread: it is always delete temp table will slow down the postmaster?

it is always delete temp table will slow down the postmaster?

From
"Chun Yit(Chronos)"
Date:
>
>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. my question is, would it slow down the postmaster speed if i continue to
>run this searching function more than 300 time per day?, cause the speed for execute searching function will graduatelly increase
>after i test it for few day? anyway to test it is causing by the drop temp table and create temp table command?
>
>regards
>ivan

Re: it is always delete temp table will slow down the postmaster?

From
"Qingqing Zhou"
Date:
""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



Re: it is always delete temp table will slow down the postmaster?

From
"Chun Yit(Chronos)"
Date:
----- Original Message -----
From: "Qingqing Zhou" <zhouqq@cs.toronto.edu>
To: <pgsql-performance@postgresql.org>
Sent: Thursday, August 11, 2005 2:37 PM
Subject: Re: [PERFORM] it is always delete temp table will slow down the
postmaster?


>
> ""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
>

>sorry, but truncate table cannot use inside function, any other way ?
>Regards
>ivan
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>               http://www.postgresql.org/docs/faq
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.338 / Virus Database: 267.10.5/68 - Release Date: 10/Aug/05
>