From: J@Planeti.Biz
To: pgsql-performance@postgresql.org
Subject: Query optimization with X Y JOIN
Date: Thu, 26 Jan 2006 10:43:12 -0500
Message-ID: <005d01c6228f$3772dca0$0d310d05@fatchubby> (raw)
References: <786c2f6d0601260206k2201a548p48af7c7fc085d3b2@mail.gmail.com>
Hey guys, how u been. This is quite a newbie question, but I need to ask it. I'm trying to wrap my mind around the syntax of join and why and when to use it. I understand the concept of making a query go faster by creating indexes, but it seems that when I want data from multiple tables that link together the query goes slow. The slow is typically due to expensive nested loops. The reason is, all my brain understands is:
select
tablea.data
tableb.data
tablec.data
from
tablea
tableb
tablec
where
tablea.pri_key = tableb.foreign_key AND
tableb.pri_key = tablec.foreign_key AND...
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: J@Planeti.Biz, pgsql-performance@postgresql.org
Subject: Re: Query optimization with X Y JOIN
In-Reply-To: <005d01c6228f$3772dca0$0d310d05@fatchubby>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox