X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id E325AD1CAA7 for ; Thu, 29 Apr 2004 20:45:23 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 39487-02 for ; Thu, 29 Apr 2004 20:45:05 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id D4F8DD1E350 for ; Thu, 29 Apr 2004 20:45:02 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i3TNj2T1097842 for ; Thu, 29 Apr 2004 23:45:02 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i3TNObQK063246 for pgsql-performance@postgresql.org; Thu, 29 Apr 2004 23:24:37 GMT From: Joseph Shraibman X-Newsgroups: comp.databases.postgresql.performance Subject: Re: Insert only tables and vacuum performance Date: Thu, 29 Apr 2004 19:24:40 -0400 Organization: Hub.Org Networking Services Lines: 13 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040421 X-Accept-Language: en-us, en In-Reply-To: To: pgsql-performance@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/514 X-Sequence-Number: 6814 Joseph Shraibman wrote: > I have a table that is never updated, only INSERTED into. Is there a way > I can prevent vacuum wasting time on this table besides vacuuming each > table in the db by itself and omitting this table? > > How feasable would it be to have a marker somewhere in pg that is > "updated since last vacuum" that would be cleared when vacuum runs, and > if set vacuum will ignore that table? Or even better an offset into the datatable for the earliest deleted row, so if you have a table where you update the row shortly after insert and then never touch it vacuum can skip most of the table (inserts are done at the end of the table, right?)