Is it possible to replace NL join with HS join in sql

白昼怎懂夜的黑 提交于 2019-12-13 05:29:37

问题


Hi am having a very big query comprises of two main table and 15 sub tables.

ie, Main table say table_a join with some other 10 tables.
and another main table sat table_b join with some other 5 tables.

Table_a contains - 314988 rows and 
Table_b contains - 710989 rows.

when we join i could find many NL Joins and HS joins.

intresting fact that all HSjoin cost very less and NL join cost very very high.

So is it possible to convert the joins from NL to HS Join.

Note : its all indexed.. there is no TBSCAN everything is IXSCAN.


回答1:


You can create an optimization profile, where you will indicate to the optimizer which methods it should use to access the data for the given query.

Take a look at this tutorial from DeveloperWorks: http://www.ibm.com/developerworks/data/library/techarticle/dm-1202storedprocedure/index.html



来源:https://stackoverflow.com/questions/14136463/is-it-possible-to-replace-nl-join-with-hs-join-in-sql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!