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 C6ADE564E7 for ; Tue, 22 Mar 2005 12:48:12 +0000 (GMT) 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 15748-05 for ; Tue, 22 Mar 2005 12:48:04 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.196]) by svr1.postgresql.org (Postfix) with ESMTP id 4B3EE56704 for ; Tue, 22 Mar 2005 12:48:03 +0000 (GMT) Received: by rproxy.gmail.com with SMTP id j1so1158708rnf for ; Tue, 22 Mar 2005 04:48:06 -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=giFn5o5DbtdqYzkXme9xQSi0e/aBaoW//izd1nmUcNQa2X5xibyFaf5jaHMCHn7JNJwKOTPWedY3BTELt1Y3F/VixETUIUS4VOYsTGL+E+IRM8Ryje9YpqMNYX2a3zhi3M6RkDOqqsDTXIRFI8FTBR+s/o45IhNYN+J1A2CzeDs= Received: by 10.39.2.13 with SMTP id e13mr6309550rni; Tue, 22 Mar 2005 04:48:06 -0800 (PST) Received: by 10.38.126.9 with HTTP; Tue, 22 Mar 2005 04:48:06 -0800 (PST) Message-ID: Date: Tue, 22 Mar 2005 12:48:06 +0000 From: Mike Rylander Reply-To: Mike Rylander To: Oleg Bartunov Subject: Re: Tsearch2 performance on big database Cc: Rick Jansen , pgsql-performance@postgresql.org In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit References: <42400F57.3040604@rockingstone.nl> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.244 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200503/441 X-Sequence-Number: 11146 On Tue, 22 Mar 2005 15:36:11 +0300 (MSK), Oleg Bartunov wrote: > On Tue, 22 Mar 2005, Rick Jansen wrote: > > > Hi, > > > > I'm looking for a *fast* solution to search thru ~ 4 million records of book > > descriptions. I've installed PostgreSQL 8.0.1 on a dual opteron server with > > 8G of memory, running Linux 2.6. I haven't done a lot of tuning on PostgreSQL > > itself, but here's the settings I have changed so far: > > > > shared_buffers = 2000 (anything much bigger says the kernel doesnt allow it, > > still have to look into that) > > use something like > echo "150000000" > /proc/sys/kernel/shmmax > to increase shared memory. In your case you could dedicate much more > memory. > > Regards, > Oleg And Oleg should know. Unless I'm mistaken, he (co)wrote tsearch2. Other than shared buffers, I can't imagine what could be causing that kind of slowness. EXPLAIN ANALYZE, please? As an example of what I think you *should* be seeing, I have a similar box (4 procs, but that doesn't matter for one query) and I can search a column with tens of millions of rows in around a second. -- Mike Rylander mrylander@gmail.com GPLS -- PINES Development Database Developer http://open-ils.org