Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id C89A06500E5 for ; Fri, 21 Nov 2008 13:57:24 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 34343-07 for ; Fri, 21 Nov 2008 13:57:22 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from 27.mail-out.ovh.net (27.mail-out.ovh.net [91.121.30.210]) by mail.postgresql.org (Postfix) with SMTP id 6013A64FE61 for ; Fri, 21 Nov 2008 13:57:20 -0400 (AST) Received: (qmail 25745 invoked by uid 503); 21 Nov 2008 19:15:11 -0000 Received: from b7.ovh.net (HELO mail177.ha.ovh.net) (213.186.33.57) by 27.mail-out.ovh.net with SMTP; 21 Nov 2008 19:15:11 -0000 Received: from b0.ovh.net (HELO queue-out) (213.186.33.50) by b0.ovh.net with SMTP; 21 Nov 2008 17:57:01 -0000 Received: from par69-8-88-161-102-87.fbx.proxad.net (HELO soyouz) (88.161.102.87) by ns0.ovh.net with SMTP; 21 Nov 2008 17:56:58 -0000 Date: Fri, 21 Nov 2008 18:57:50 +0100 To: Andrus , "Richard Huxton" Subject: Re: Hash join on int takes 8..114 seconds From: PFC Cc: pgsql-performance@postgresql.org Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 References: <49253FE1.3070706@archonet.com> <0205611B528C4C2CBA99AFC64E57D6E8@andrusnotebook> <75A918DFCF25470FAF96B3FE3D25A38B@andrusnotebook> <4926E2B2.9050202@archonet.com> <8A78204AA6D44C04B053E6412B244E13@andrusnotebook> Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: <8A78204AA6D44C04B053E6412B244E13@andrusnotebook> User-Agent: Opera Mail/9.62 (Linux) X-Ovh-Tracer-Id: 17756004482868643462 X-Ovh-Remote: 88.161.102.87 (par69-8-88-161-102-87.fbx.proxad.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|H 0.5/N X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200811/184 X-Sequence-Number: 31915 > How to vacuum full pg_shdepend automatically so that other users can > work at same time ? Your table is horribly bloated. You must use VACUUM FULL + REINDEX (as superuser) on it, however unfortunately, it is blocking. Therefore, you should wait for sunday night to do this, when noone will notice. Meanwhile, you can always VACUUM it (as superuser) and REINDEX it. And while you're at it, VACUUM FULL + reindex the entire database. To avoid such annoyances in the future, you should ensure that autovacuum runs properly ; you should investigate this. If you use a cron'ed VACUUM that does not run as superuser, then it will not be able to VACUUM the system catalogs, and the problem will come back.