Re: star join optimization

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Rudyar <rudyar(dot)cortes(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: star join optimization
Date: 2011-11-14 15:20:17
Message-ID: CA+Tgmoa0A8vopPbRTkT=rKEfyi_yy8OjoR3h5DDBFn35i6OUsA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 14, 2011 at 8:25 AM, Rudyar <rudyar(dot)cortes(at)gmail(dot)com> wrote:
> the hybrid hash join algorithm implemented in the current version of
> PostgreSQL has any kind of optimization
> for star join queries for Data Warehouse model?

Not really. As much as possible, we try to make the query optimizer a
general-purpose tool that can handle any query you happen to throw at
it, rather than putting in special-purpose hacks to cater to specific
types of queries. I'm not aware of anything in particular that we
could do to better optimize the star-join case than what we do for any
other query.

Now, one thing that was discussed a year or two ago was the
possibility of considering join algorithms that can handle more than
two tables at a time. Currently, we don't do that, so a four-way join
will be implemented either by joining two tables, then the other two
tables, and then the results of those; or more commonly by joining two
tables, joining the results to a third table, and then joining those
results to the final table. Due to the pipelined nature of our
executor, this works pretty well, but it's possible that there are
better algorithms out there.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rudyar 2011-11-14 15:36:09 Re: star join optimization
Previous Message Thom Brown 2011-11-14 15:12:53 Re: Detach/attach database