On Nov 27, 2006, at 02:45 , Tom Lane wrote:
Alexander Staubo <[EMAIL PROTECTED]> writes:
select comments.*, users.*
from comments
left outer join users on
users.id = comments.creator_id
inner join events_comments on
comments.id = events_comments.comment_id
and events_comments.event_id
Alexander Staubo <[EMAIL PROTECTED]> writes:
> select comments.*, users.*
> from comments
> left outer join users on
>users.id = comments.creator_id
> inner join events_comments on
>comments.id = events_comments.comment_id
>and events_comments.event_id = 9244
> The outer join seems unn
> The outer join seems unnecessarily slow. Is there anything I can do
> to speed it up?
>
> PostgreSQL 8.1.3 on OS X (MacPorts).
This is just a guess on my part, but would it help if you preformed the inner
join first to filter
out the most of the unwated rows that then preform the outer join
I have thee primary tables: comments, events and users. There's a
join table events_comments tying comments to events. There are B-tree
indexes on every column involved, and the tables are freshly vacuumed
and analyzed;
A simple select to retrieve all comments for a given event, with an
o