Sybase 提供了对表进行hash join的命令 如下:
select * from t1, t2
plan "(h_join (scan t1) (scan t2) )"
ASE 15之后 sybase 默认开启 allrows_mix (之前是 allrows_oltp)
区别如下:(copy from )
Optimization Goal Details
allrows_oltp [nested loop join]
Nested-loop joins provide efficient access when tables are indexed on join columns.
allrows_mix [merge joins + allrows_oltp]
A merge join can use multiple worker processes to perform:. The scan that selects rows into a worktable, note a merge join may requires a sort.
allrows_dss [hash joins + allrows_mix]
The hash join algorithm builds an in-memory hash table of the smaller of its targets.
阅读(566) | 评论(0) | 转发(0) |