Edison Azzi <[EMAIL PROTECTED]> writes:
> You are rigth, the planner will not eliminate the join, see:
> select * from cta_pag a, cta_pag p where a.nrlancto=p.nrlancto and
> p.nrlancto = 21861;
> EXPLAIN:
> Nested Loop (cost=0.00..11.48 rows=1 width=816)
> -> Index Scan using cta_pag_pk on c
Richard Huxton escreveu:
Edison Azzi wrote:
Hi,
I´m trying to optimize some selects between 2 tables and the best way
I found was
alter the first table and add the fields of the 2nd table. I adjusted
the contents and
now a have only one table with all info that I need. Now resides my
probl
Edison Azzi wrote:
Richard Huxton escreveu:
However, even if you removed the condition on origem, I don't think
the planner will notice that it can eliminate the join. It's just too
unusual a case for the planner to have a rule for it.
I might be wrong about the planner - I'm just another use
Edison Azzi wrote:
Hi,
I´m trying to optimize some selects between 2 tables and the best way I
found was
alter the first table and add the fields of the 2nd table. I adjusted
the contents and
now a have only one table with all info that I need. Now resides my
problem, because
of legacy queri
Hi,
I´m trying to optimize some selects between 2 tables and the best way I
found was
alter the first table and add the fields of the 2nd table. I adjusted
the contents and
now a have only one table with all info that I need. Now resides my
problem, because
of legacy queries I decided to make