Question about join - Mailing list pgsql-novice

From Matthew Foster
Subject Question about join
Date
Msg-id CAP1ZYZHiD3VSfm-Ov8BgsV_ceXtN2naQkc3FE833=StO3wnH4g@mail.gmail.com
Whole thread Raw
Responses Re: Question about join  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-novice
I have two tables that represent a one-to-many relationship in our database.  One table is relatively small (~2000 rows) and the other is relatively large (~65M rows).  When I try to join these tables, Postgres does a sequential scan an the large table.  This, combined with the append and hash join is taking about 3 minutes to complete.

I'm guessing that I am doing something wrong in my query to make it take so long.  Is there a good reference somewhere on how to do joins intelligently?

Matt

pgsql-novice by date:

Previous
From: Jayadevan M
Date:
Subject: Re: Create a new table from records not joined in a left outer join
Next
From: "Kevin Grittner"
Date:
Subject: Re: Question about join