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 CA65253666 for ; Thu, 14 Apr 2005 11:20:38 -0300 (ADT) 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 76592-09 for ; Thu, 14 Apr 2005 14:20:36 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.195]) by svr1.postgresql.org (Postfix) with ESMTP id 61D1A533AC for ; Thu, 14 Apr 2005 11:20:35 -0300 (ADT) Received: by zproxy.gmail.com with SMTP id 34so493928nzf for ; Thu, 14 Apr 2005 07:20:36 -0700 (PDT) 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:content-disposition:references; b=AitmFXC9tJ4sE4ho7sBvtPX6Lo6GtQsNxf/2wcp4UyONbqDs6560xUowU7aq9nAAnAtmy9CzOJFLpaYZ+NofpkyDOMY0Rm3iOS1HYok22F2LYqeXSs+7cozsixO899lwlb24U9669NbqXJN7F8KKqXHRmkwann/G7r08VKCs0/g= Received: by 10.36.77.17 with SMTP id z17mr114077nza; Thu, 14 Apr 2005 07:20:36 -0700 (PDT) Received: by 10.36.22.15 with HTTP; Thu, 14 Apr 2005 07:20:36 -0700 (PDT) Message-ID: <758d5e7f0504140720754c7750@mail.gmail.com> Date: Thu, 14 Apr 2005 16:20:36 +0200 From: Dawid Kuroczko Reply-To: Dawid Kuroczko To: Joel Fradkin Subject: Re: speed of querry? Cc: PostgreSQL Perform In-Reply-To: <000001c540f9$311dd440$797ba8c0@jfradkin> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <27509.1113461226@sss.pgh.pa.us> <000001c540f9$311dd440$797ba8c0@jfradkin> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.754 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, FROM_ENDS_IN_NUMS, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200504/276 X-Sequence-Number: 11673 On 4/14/05, Joel Fradkin wrote: > I have done a vacuum and a vacuum analyze. > I can try again for kicks, but it is not in production so no new records = are > added and vacuum analyze is ran after any mods to the indexes. >=20 > I am still pursuing Dell on why the monster box is so much slower then th= e > desktop as well. First thing: Do something like: ALTER TABLE tbljobtitle ALTER COLUMN clientnum SET STATISTICS 50; make it for each column used, make it even higher than 50 for many-values columns. THEN make VACUUM ANALYZE; Then do a query couple of times (EXPLAIN ANALYZE also :)), then do: SET enable_seqscan =3D off; and rerun the query -- if it was significantly faster, you will want to do: SET enable_seqscan =3D on; and tweak: SET random_page_cost =3D 2.1; ...and play with values. When you reach the random_page_cost which suits your data, you will want to put it into postgresql.conf I am sorry if it is already known to you. :) Also, it is a rather simplist= ic approach to tuning PostgreSQL but it is worth doing. Especially the statistics part. :) Regards, Dawid