Oracle: 索引与 … where a like xx

摘自《Troubleshooting Oracle Performance》

… where a like ‘A%’ 可以用上索引,即Index Range Scan

但 … where a like ‘%A’则会导致全表扫描或全索引扫描

也就是说,如果以通配符开头,就会导致效率低的模糊搜索

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.