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 997FDD1C952 for ; Mon, 19 Apr 2004 09:02:20 -0300 (ADT) 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 79041-05 for ; Mon, 19 Apr 2004 09:02:22 -0300 (ADT) Received: from tht.net (vista.tht.net [216.126.88.2]) by svr1.postgresql.org (Postfix) with ESMTP id 8D489D1BB93 for ; Mon, 19 Apr 2004 09:02:18 -0300 (ADT) Received: from [134.22.69.199] (dyn-69-199.tor.dsl.tht.net [134.22.69.199]) by tht.net (Postfix) with ESMTP id E818C76A6D; Mon, 19 Apr 2004 08:02:18 -0400 (EDT) Subject: Re: very slow simple query - outer join makes it quicker From: Rod Taylor To: gerard.isdell@kinetic.co.uk Cc: Postgresql Performance In-Reply-To: References: Content-Type: text/plain Message-Id: <1082376074.24414.3.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Mon, 19 Apr 2004 08:01:15 -0400 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/264 X-Sequence-Number: 6564 > There are other tables, such as the messages table, that have 10s of > thousands of rows and they return records much more quickly. > There must be something seriously wrong for simple queries like this to take > so long. Have you run VACUUM recently? If not, run VACUUM FULL against the users table and see if that makes a difference.