CREATE VIEW stock_item
AS
SELECT /*+ leading(s) use_merge(i) */
i_price, i_name, i_data, s_i_id, s_w_id, s_order_cnt, s_ytd, s_remote_cnt, s_quantity, s_data, s_dist_01, s_dist_02, s_dist_03, s_dist_04, s_dist_05, s_dist_06, s_dist_07, s_dist_08, s_dist_09, s_dist_10
FROM stok s, item i
WHERE s.s_i_id = i.i_id;
Query OK, 0 rows affected (0.01 sec)文章来源:https://www.toymoban.com/news/detail-649859.html
提示(Hint) USE
/*+ ALL_ROWS */ 选择cost-based optimizer里总响应时间最短的计划(DW)
/*+ FIRST_ROWS */ 选择cost-based optimizer里最快得出第一行的计划(OLTP)--Nested Loop Join
/*+ RULE */ 以rule-based optimization制作计划
/*+ FULL(table) */ 不管有无index,选择full table scan
/*+ HASH_AJ(table) */ 将NOT IN subQuery变化为hash antijoin
/*+ INDEX(table index) */ 将特定表的特定索引正向使用
/*+ INDEX_DESC(table index) */ 将特定表的特定索引逆向使用
/*+ INDEX_FFS(table index) */ 只用索引构成的sql 上,使用fast full index scan
/*+ ORD文章来源地址https://www.toymoban.com/news/detail-649859.html
到了这里,关于Oracle之hint介绍的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!