X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 78F9AD1B442 for ; Wed, 26 Nov 2003 22:33:17 +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 88758-05 for ; Wed, 26 Nov 2003 18:32:54 -0400 (AST) Received: from fuji.krosing.net (217-159-136-226-dsl.kt.estpak.ee [217.159.136.226]) by svr1.postgresql.org (Postfix) with ESMTP id D6412D1B494 for ; Wed, 26 Nov 2003 18:32:45 -0400 (AST) Received: from fuji.krosing.net (localhost.localdomain [127.0.0.1]) by fuji.krosing.net (8.12.8/8.12.8) with ESMTP id hAQMWULX003331; Thu, 27 Nov 2003 00:32:31 +0200 Received: (from hannu@localhost) by fuji.krosing.net (8.12.8/8.12.8/Submit) id hAQMWUrl003329; Thu, 27 Nov 2003 00:32:30 +0200 X-Authentication-Warning: fuji.krosing.net: hannu set sender to hannu@tm.ee using -f Subject: Re: cross table indexes or something? From: Hannu Krosing To: Jeremiah Jahn Cc: postgres performance In-Reply-To: <1069877651.22346.13.camel@bluejay.goodinassociates.com> References: <1069877651.22346.13.camel@bluejay.goodinassociates.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1069885949.3176.57.camel@fuji.krosing.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Thu, 27 Nov 2003 00:32:30 +0200 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/281 X-Sequence-Number: 4841 Jeremiah Jahn kirjutas K, 26.11.2003 kell 22:14: > I was wondering if there is something I can do that would act similar to > a index over more than one table. > > I have about 3 million people in my DB at the moment, they all have > roles, and many of them have more than one name. > > for example, a Judge will only have one name, but a Litigant could have > multiple aliases. Things go far to slow when I do a query on a judge > named smith. If you dont need all the judges named smith you could try to use LIMIT. Have you run ANALYZE ? Why does DB think that there is only one judge with name like SMITH% ? ------------- Hannu P.S. Always send EXPLAIN ANALYZE output if asking for advice on [PERFORM] ------------- Hannu