X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 2FC239FA5D2 for ; Mon, 5 Jun 2006 11:35:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 81821-02 for ; Mon, 5 Jun 2006 11:35:34 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 577819FA111 for ; Mon, 5 Jun 2006 11:35:32 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 82B4F56440; Mon, 5 Jun 2006 09:35:30 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Mon, 5 Jun 2006 09:35:29 -0500 Date: Mon, 5 Jun 2006 09:35:29 -0500 From: "Jim C. Nasby" To: Cstdenis Cc: Nis Jorgensen , pgsql-performance@postgresql.org Subject: Re: How can I make this query faster (resend) Message-ID: <20060605143529.GP53487@pervasive.com> References: <03e001c67b99$8321f010$6401a8c0@chris> <447177B2.2020109@superlativ.dk> <013801c6832d$1cf73d90$6401a8c0@chris> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <013801c6832d$1cf73d90$6401a8c0@chris> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060605:cstdenis@voicio.com::lW0v3qK58Ezz50Pq:000000000000000000 0000000000000000000000003Ct/ X-Hashcash: 1:20:060605:nis@superlativ.dk::HUKuk11Ksyx0yA5E:00000000000000000000 0000000000000000000000002bHw X-Hashcash: 1:20:060605:pgsql-performance@postgresql.org::OAQF/448u/RJs8fN:00000 0000000000000000000000003fm7 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/34 X-Sequence-Number: 19391 On Mon, May 29, 2006 at 07:35:14AM -0700, Cstdenis wrote: > > To be honest, you're pushing things expecting a machine with only 1G to > > serve 300 active connections. How large is the database itself? > > The database is 3.7G on disk. There is about 1G of actual data in it -- the > rest is dead tuples and indices. (I vacuum regularly, but a vacuum full > causes too much downtime to do unless I have to) It sounds like you're not vacuuming anywhere near regularly enough if you have that much dead space. You should at least reindex. > > > I know hyperthreading is considered something that can slow down a > server but with my very high concurancy (averages about 400-500 concurant > users during peak hours) I am hoping the extra virtual CPUs wil help. Anyone > have experance that says diferent at high concurancy? > > > > Best bet is to try it and see. Generally, people find HT hurts, but I > > recently saw it double the performance of pgbench on a windows XP > > machine, so it's possible that windows is just more clever about how to > > use it than linux is. > > Anyone know if those who have found it hurts are low concurancy complex cpu > intensive queries or high concurancy simple queries or both? I can > understand it hurting in the former, but not the later. I'll have to give it > a try I guess. It should at least help my very high load averages. The issue is that HT doesn't give you anything close to having 2 CPUs, so for all but the most trivial and limited cases it's not going to be a win. Incidentally, the only good results I've seen with HT are on windows. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461