X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id CC5BF9DC9D1 for ; Fri, 20 Jan 2006 13:14:39 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 12044-04 for ; Fri, 20 Jan 2006 13:14:38 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id A12429DC80D for ; Fri, 20 Jan 2006 13:14:37 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k0KHEaDk025128; Fri, 20 Jan 2006 12:14:36 -0500 (EST) To: Martijn van Oosterhout cc: Stephan Vollmer , pgsql-general@postgresql.org Subject: Re: Creation of tsearch2 index is very slow In-reply-to: <20060120170452.GC31908@svana.org> References: <43D0ED57.1020608@gmx.de> <17454.1137771321@sss.pgh.pa.us> <20060120170452.GC31908@svana.org> Comments: In-reply-to Martijn van Oosterhout message dated "Fri, 20 Jan 2006 18:04:52 +0100" Date: Fri, 20 Jan 2006 12:14:35 -0500 Message-ID: <25127.1137777275@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.094 required=5 tests=[AWL=0.094] X-Spam-Score: 0.094 X-Spam-Level: X-Archive-Number: 200601/1012 X-Sequence-Number: 89957 Martijn van Oosterhout writes: > The cost on inserting would generally go to either penalty, or > picksplit. Certainly if you're inserting lots of values in a short > interval, I can imagine picksplit being nasty, since the algorithms for > a lot of datatypes are not really reknown for their speed. Tut tut ... in the words of the sage, it is a capital mistake to theorize in advance of the data. You may well be right, but on the other hand it could easily be something dumb like an O(N^2) loop over a list structure. I'll post some gprof numbers after Stephan sends me the dump. We should probably move the thread to someplace like pgsql-perform, too. regards, tom lane