X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B27D95323C for ; Fri, 1 Apr 2005 13:17:56 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 99564-05 for ; Fri, 1 Apr 2005 12:17:53 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.206]) by svr1.postgresql.org (Postfix) with ESMTP id 7BC3153237 for ; Fri, 1 Apr 2005 13:17:52 +0100 (BST) Received: by rproxy.gmail.com with SMTP id j1so630600rnf for ; Fri, 01 Apr 2005 04:17:56 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=uD35jnMWyrkhQp/a32/jUmKE02UkXF/ovfTMw8IDQN/fBxacTuc59eix02H50VmqjddUjH7vPOOUjgA/8wuWGQwJVzRVmP6Av3ycrsPYVjFFhFcKFLIpU6bNc1PYigsjoHlhaE5w0QeuTxpH7bptat/mjfrNIOdWSNA6PPrhknU= Received: by 10.38.15.55 with SMTP id 55mr2334649rno; Fri, 01 Apr 2005 04:17:56 -0800 (PST) Received: by 10.38.126.31 with HTTP; Fri, 1 Apr 2005 04:17:56 -0800 (PST) Message-ID: Date: Fri, 1 Apr 2005 12:17:56 +0000 From: Mike Rylander Reply-To: Mike Rylander To: Yudie Pg Subject: Re: How to speed up word count in tsearch2? Cc: pgsql-performance@postgresql.org In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit References: <200503311250.45932.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.25 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200504/5 X-Sequence-Number: 11402 On Apr 1, 2005 4:03 AM, Yudie Pg wrote: > > You need to look at what else is using RAM on that machine. And maybe buy > > more. > > Ouch.. I had that feeling also. then how can I know how much memory > needed for certain amount words? and why counting uncommon words are > faster than common one? Because the index is a tree. You fall of the end of a branch faster with uncommon words. Plus the executor goes back to the table for fewer real rows with uncommon words. It sounds like you may just need a faster disk subsystem. That would shrink the time for the first query on any particular set of words, and it would make everything else faster as a nice side effect. What does your disk layout look like now? -- Mike Rylander mrylander@gmail.com GPLS -- PINES Development Database Developer http://open-ils.org