Skip site navigation (1) Skip section navigation (2)

Re: drop tempoary table VERY slow

From: Andrew McMillan <andrew(at)catalyst(dot)net(dot)nz>
To: Sam Liddicott <sam(dot)liddicott(at)ananova(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: drop tempoary table VERY slow
Date: 2002-06-02 10:52:17
Message-ID: 1023015137.6465.4.camel@kant.mcmillan.net.nz (view raw or flat)
Thread:
Lists: pgsql-bugs
On Fri, 2002-05-31 at 22:28, Sam Liddicott wrote:
> And when I do drop a table CPU usage goes to 99% on one CPU.

When did you last do a vacuum?  If you are adding and dropping temporary
tables a lot, perhaps you should vacuum pg_class and pg_attribute often
as well.

Regards,
					Andrew.
>  
> Sam
> 
> -----Original Message-----
> From: Sam Liddicott 
> Sent: 31 May 2002 10:57
> To: 'pgsql-bugs(at)postgresql(dot)org'
> Subject: drop tempoary table VERY slow
> 
> 
> I have a DB where this:
>  
> select 1 into temporary table x;
> runs quickly, but
>  
> drop table x;
>  
> takes many seconds to run.
>  
> I don't know why.
>  
> But:
>  
> begin;
> 
> select 1 into temporary table x;
> abort;
>  
> is very quick.
>  
> Note the slow dropping applies to automatic dropping of temporary tables
> when the connection is closed.
> I now "abort" all my query sessions for speed.
>  
> I cannot reproduce this on "template1" and it has not always been the case
> for my DB.
>  

-- 
--------------------------------------------------------------------
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington
WEB: http://catalyst.net.nz/        PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201    MOB: +64(21)635-694    OFFICE: +64(4)499-2267
       Are you enrolled at http://schoolreunions.co.nz/ yet?


In response to

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2002-06-02 20:45:12
Subject: Re: Bug #655: win32 client and bytea column
Previous:From: Bruce MomjianDate: 2002-06-02 06:31:59
Subject: Re: Bug #653: Unable to insert binary data into BYTEA

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group