我有这个外部表(myforeigntable)和一个只有一列和4个值的本地表(test_table)
select a.col1, a.col2 from myforeigntable a
join test_table b on a.id=b.id
where a.code='FINISHED'
解释分析给出了这一点:
" -> Foreign Scan on myforeigntable b (cost=100.00..135.80 rows=10 width=16) (actual time=2.544..531401.116 rows=73934983 loops=1)"
" Output: a.col1, a.col2, a.id"
" Remote SQL: SELECT col1, col2, id FROM myforeigntable WHERE ((code= 'FINISHED'::text))"
有没有一种方法可以“强制”包装器按ID包含过滤器?