Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp> writes:
> $ psql TMP -c "explain select products.id as pid from
> products,rel_genres_movies where maker_id='53' OR
> (rel_genres_movies.minor_id='11' AND rel_genres_movies.prod_id=products.id)"
Is that *really* the query you want to run?
Rows having maker_id=53 will be joined to *every* row of the other
table. I'm suspecting you really wanted
where (maker_id='53' OR rel_genres_movies.minor_id='11') AND
rel_genres_movies.prod_id=products.id
so that the join behaves sensibly.
regards, tom lane