惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
The GitHub Blog
The GitHub Blog
C
Check Point Blog
博客园_首页
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
F
Full Disclosure
Microsoft Security Blog
Microsoft Security Blog
爱范儿
爱范儿
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
G
GRAHAM CLULEY
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
V
Vulnerabilities – Threatpost
K
Kaspersky official blog
博客园 - 司徒正美
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
Project Zero
Project Zero
云风的 BLOG
云风的 BLOG
Cisco Talos Blog
Cisco Talos Blog
Know Your Adversary
Know Your Adversary
雷峰网
雷峰网
V
V2EX - 技术
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Spread Privacy
Spread Privacy
罗磊的独立博客
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
SecWiki News
SecWiki News
Schneier on Security
Schneier on Security
O
OpenAI News
Jina AI
Jina AI
PCI Perspectives
PCI Perspectives
Cyberwarzone
Cyberwarzone
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog RSS Feed
I
InfoQ
D
Docker
P
Palo Alto Networks Blog
Recorded Future
Recorded Future
M
MIT News - Artificial intelligence
博客园 - Franky
B
Blog
Scott Helme
Scott Helme
博客园 - 叶小钗
D
DataBreaches.Net

博客园 - highmayor

Screen numbers ABAP 培训笔记 part 7 更改选择屏幕的GUI STATUS---RS_SET_SELSCREEN_STATUS 隐藏标准选择屏幕的执行按钮 SAP秀才-FI速成手册 FOR ALL ENTRIES的效率问题 - highmayor SAP学习笔记(HR Develepment学习笔记1) 程序间的调用 abap技术问题中文 - highmayor - 博客园 函数组的文件结构 - highmayor 闲说继承 oracle中使用SQL递归语句 - highmayor oracle删除重复行 - highmayor 深度理解按位异或运算符 一个容易忽略的陷阱:修改字符串常量的值 - highmayor 使用sqlplus copy 命令在两个数据库间转移数据 - highmayor Oracle数据库 Exp/Imp工具性能调优 - highmayor 通过JDBC操作ORACLE数据库 - highmayor 算法的时间复杂度(计算实例) - highmayor
在ABAP的SQL语句中写Oracle Hints
highmayor · 2011-09-23 · via 博客园 - highmayor

①用过的两个写法:
  1、指定使用全表扫描:%_HINTS ORACLE 'FULL(table_name)'
  2、指定索引:%_HINTS ORACLE 'INDEX(table_name index_name)'
  其他Oracle Hints的写法可以参见这篇文章:Oracle Hint的用法
  在SQL语句优化过程中,经常会用到hint。
  ②Using secondary indexes
  Consider the following example:
  SELECT * FROM SPFLI
  %_HINTS ORACLE 'INDEX("SPFLI" "SPFLI~001")'
  .......
  ENDSELECT.In the above example, 001 is the secondary index of the table SPFLI. It's a well-known fact that the efficient way of retrieving data from the database tables is by using secondary indexes. Many database vendors provide the optimizer hints for the same. From SAP v4.5, optimizer hints can be provided by the %_HINTS parameter. This is dependent on the database systems that support optimizer hints. The point to be noted here is these optimizer hints are not standardized by the SQL standards. Each database vendor is free to provide the optimizer hints.
  Now to know which index to use for our table:
  1. Go to SE11 and there specify the table name
  2. Now from the menu, goto --> indexes
  3. select the required index.
  Now suppose that the identifier 001 represents a non-unique secondary index comprising of the columns CITYFROM and CITYTO. The index name should be defined as:

~
  like SPFLI~001 in the above example.The sequence of fields in the WHERE condition is of no relevance in using this optimizers index. If you specify hints incorrectly, ABAP ignores them but doesn't return a syntax error or runtime error.
  The code was written in R/3 4.6C.
  Code
  Consider the following example:
  REPORT Suresh_test.
  TABLES: spfli.
  DATA : t_spfli LIKE spfli OCCURS 0 WITH HEADER LINE.
  SELECT * FROM spfli
  INTO TABLE t_spfli
  %_HINTS ORACLE 'INDEX("SPFLI" "SPFLI~001")'.
  LOOP AT t_spfli.
  WRITE :/ t_spfli.
  ENDLOOP.
  ③ABAP--如何在SELECT语句中指定索引(example)
  report z_generic_test_program .
  tables: csks. start-of-selection.
  select * up to 10 rows from csks
  where kokrs <> space and
  kostl <> space %_hints oracle 'index(csks"J")'.
  write: / csks. endselect.
  ④Control over FOR ALL ENTRIES Hints
  Under the heading Database Interface Hints, Note 129385 describes the options you have for influencing the database interface by entering hints. The hints are evaluated in the database interface itself and are not passed on to the database. Starting with kernel Release 4.6B all the above mentioned FOR ALL ENTRIES parameters can be set via such a hint for a single statement. In the example:
  SELECT * FROM [..] FOR ALL ENTRIES IN [..] WHERE [..]
  %_HINTS ORACLE '&prefer_in_itab_opt 1&&prefer_fix_blocking -1&'.
  This way, the boolean parameter 'prefer_in_itab_opt' is explictly set and the boolean parameter 'prefer_fix_blocking' is set to its default value. FOR ALL ENTRIES hints, like hints are generally only used as a a corrective device in