From: "Mark Cowlishaw" <markc@ot.com.au>
>
> I noticed that running queries that do -not- use declared table aliases in
> the 'where' clause seem to run a hell-of-a-lot slower than when aliases
are
> used. Is there a valid reason for this? It started out as a typo but now
I'm
> curious.
>
> (7.0.3)
>
> eg:
>
> select
[snip]
> from
> releases as rel, subsystems as subs,
> functions as func, purposes as purp, procedures as proc
> where
> rel.project_id = 53
[snip]
>
> (runs pretty much instantly)
>
> -versus-
>
>
> select
[snip]
> from
> releases as rel, subsystems as subs,
> functions as func, purposes as purp, procedures as proc
> where
> releases.project_id = 53
[snip]
> (I get sick of waiting after > 30sec and ^C the query (in psql))
>
> --
> Mark Cowlishaw <markc@ot.com.au>
I think the second where refers to a different "releases" so it's equivalent
to doing a join without a joining condition (set product? can't remember -
need more coffee). I think it's the same as putting another "releases" in
"from" is what I'm trying to say (badly)
- Richard Huxton