Help Center > > Developer Guide> Query Performance Optimization> Tuning Queries> Hint-based Tuning> Sublink Name Hints

Sublink Name Hints

Updated at:Jul 15, 2020 GMT+08:00


These hints specify the name of a sublink block.


blockname (table)

Parameter Description

  • table indicates the name you have specified for a sublink block.
  • This hint is used by an outer query only when a sublink is pulled up. Currently, only the Agg equivalent join, IN, and EXISTS sublinks can be pulled up. This hint is usually used together with the hints described in the previous sections.
  • The subquery after the FROM keyword is hinted by using the subquery alias. In this case, blockname becomes invalid.
  • If a sublink contains multiple tables, the tables will be joined with the outer-query tables in a random sequence after the sublink is pulled up. In this case, blockname also becomes invalid.


explain select /*+nestloop(store_sales tt) */ * from store_sales where ss_item_sk in (select /*+blockname(tt)*/ i_item_sk from item group by 1);

tt indicates the sublink block name. After being pulled up, the sublink is joined with the outer-query table store_sales by using nestloop. The optimized plan is as follows:

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?

Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel