X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 50FB3D1D643 for ; Thu, 12 Feb 2004 01:27:36 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 92675-02 for ; Wed, 11 Feb 2004 21:27:36 -0400 (AST) Received: from linda-3.paradise.net.nz (bm-3a.paradise.net.nz [202.0.58.22]) by svr1.postgresql.org (Postfix) with ESMTP id B5054D1D63E for ; Wed, 11 Feb 2004 21:27:33 -0400 (AST) Received: from smtp-3.paradise.net.nz (smtp-3b.paradise.net.nz [202.0.32.212]) by linda-3.paradise.net.nz (Paradise.net.nz) with ESMTP id <0HSY00LFK6OHJI@linda-3.paradise.net.nz> for pgsql-performance@postgresql.org; Thu, 12 Feb 2004 14:27:36 +1300 (NZDT) Received: from paradise.net.nz (218-101-45-46.paradise.net.nz [218.101.45.46]) by smtp-3.paradise.net.nz (Postfix) with ESMTP id 061F9AE115; Thu, 12 Feb 2004 14:26:41 +1300 (NZDT) Date: Thu, 12 Feb 2004 14:27:44 +1300 From: Mark Kirkwood Subject: Re: slow database In-reply-to: To: alemon@tiago.hazor.com.br Cc: "scott.marlowe" , Tom Lane , Postgresql Performance Message-id: <402AD690.9020106@paradise.net.nz> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=us-ascii Content-transfer-encoding: 7bit X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031213 References: X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/143 X-Sequence-Number: 5667 If things are still slow after you have checked your keys as indicated, then pick one query and post the output from EXPLAIN ANALYZE for the list to examine. oh - and ensure you are *not* still using your original postgresql.conf :-) best wishes Mark scott.marlowe wrote: >First thing I would check is to make sure all those foreign keys are the >same type. > >Second, make sure you've got indexes to go with them. I.e. on a multi-key >fk, have a multi-key index. > > > > >