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 7935A53D83 for ; Thu, 14 Apr 2005 11:45: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 91700-02 for ; Thu, 14 Apr 2005 14:45:33 +0000 (GMT) Received: from vms044pub.verizon.net (vms044pub.verizon.net [206.46.252.44]) by svr1.postgresql.org (Postfix) with ESMTP id 4CBAA53689 for ; Thu, 14 Apr 2005 11:45:32 -0300 (ADT) Received: from jfradkin ([63.162.100.127]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IEX004RDYC0U2Z0@vms044.mailsrvcs.net> for pgsql-performance@postgresql.org; Thu, 14 Apr 2005 09:45:37 -0500 (CDT) Date: Thu, 14 Apr 2005 10:45:48 -0400 From: "Joel Fradkin" Subject: Re: speed of querry? In-reply-to: <758d5e7f0504140720754c7750@mail.gmail.com> To: "'Dawid Kuroczko'" Cc: "'PostgreSQL Perform'" Message-id: <000b01c54100$a68d2300$797ba8c0@jfradkin> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Mailer: Microsoft Outlook, Build 10.0.6626 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: quoted-printable Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200504/281 X-Sequence-Number: 11678 Josh from commandprompt.com had me alter the config to have default_statistics_target =3D 250 Is this somehow related to what your asking me to do? I did do an analyze, but have only ran the viw a few times. Joel Fradkin =20 -----Original Message----- From: Dawid Kuroczko [mailto:qnex42@gmail.com]=20 Sent: Thursday, April 14, 2005 9:21 AM To: Joel Fradkin Cc: PostgreSQL Perform Subject: Re: [PERFORM] speed of querry? 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 = the > 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 simplistic approach to tuning PostgreSQL but it is worth doing. Especially the statistics part. :) Regards, Dawid