cross table indexes?

From: Jeremiah Jahn <jeremiah(at)cs(dot)earlham(dot)edu>
To: postgres list <pgsql-general(at)postgresql(dot)org>
Subject: cross table indexes?
Date: 2003-11-26 14:04:07
Message-ID: 1069855447.5827.1526.camel@bluejay.goodinassociates.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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. Does any one know a possible way to speed this up?

I would think that In a perfect world there would be a way to create an
index on commonly used joins, or something of that nature. I've tried
partial indexes, but the optimizer feels that it would be quicker to do
an index scan for smith% then join using the pkey of the person to get
their role. For litigants, this makes since, for non-litigants, this
doesn't.

thanx for any insight,
-jj-

--
"You can't make a program without broken egos."
--
Jeremiah Jahn <jeremiah(at)cs(dot)earlham(dot)edu>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Claudio Lapidus 2003-11-26 14:19:34 marking record origin in views
Previous Message Jeremiah Jahn 2003-11-26 14:03:41 cross table indexes?