AND (tptfbdr_a.codptf = 'CROSB')
AND (tptfbdr_b.codptf = 'WARTS')
What are the cardinalities of these 2 columns?
Do you analyze tables and indexes?
Try this:
ANALYZE TABLE xxxx estimate statistics sample 10000 rows
for table
for all indexes
for all indexed columns;
Then run the explain plan. Post the plans here.




Reply With Quote