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 1627D56638 for ; Sun, 13 Mar 2005 19:54:44 +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 17522-01 for ; Sun, 13 Mar 2005 19:54:36 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id D4F1256629 for ; Sun, 13 Mar 2005 19:54:35 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j2DJsXku019294; Sun, 13 Mar 2005 14:54:33 -0500 (EST) To: =?windows-1250?Q?Miroslav_=8Aulc?= Cc: John Arbash Meinel , PGSQL mailing list Subject: Re: How to read query plan In-reply-to: <423497FE.6040908@startnet.cz> References: <42345D24.8070104@startnet.cz> <4234692E.3050802@arbash-meinel.com> <42347407.2000202@startnet.cz> <423478B1.7080106@arbash-meinel.com> <18381.1110741354@sss.pgh.pa.us> <423497FE.6040908@startnet.cz> Comments: In-reply-to =?windows-1250?Q?Miroslav_=8Aulc?= message dated "Sun, 13 Mar 2005 20:43:58 +0100" Date: Sun, 13 Mar 2005 14:54:33 -0500 Message-ID: <19293.1110743673@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/230 X-Sequence-Number: 10935 =?windows-1250?Q?Miroslav_=8Aulc?= writes: > I've just tried to uncomment the settings for these parameters with with > no impact on the query speed. > shared_buffers = 48000 # min 16, at least max_connections*2, > 8KB each > work_mem = 1024 # min 64, size in KB > maintenance_work_mem = 16384 # min 1024, size in KB > max_stack_depth = 2048 # min 100, size in KB Hmm. Given the small size of the auxiliary tables, you'd think they'd fit in 1MB work_mem no problem. But try bumping work_mem up to 10MB just to see if it makes a difference. (BTW, you do know that altering the .conf file doesn't in itself do anything? You have to SIGHUP the postmaster to make it notice the change ... and for certain parameters such as shared_buffers, you actually have to stop and restart the postmaster. You can use the SHOW command to verify whether a change has taken effect.) > I have checked this and there are some JOINs smallint against integer. > Is that problem? That probably explains why some of the joins are merges instead of hashes --- hash join doesn't work across datatypes. Doesn't seem like it should be a huge problem though. I was more concerned about the possibility of slow locale-dependent string comparisons. regards, tom lane