Oracle SQL Performance Optimization

Source: Internet
Author: User

1. Select the most efficient table name sequence (only valid in the rule-based Optimizer ).

2. Connection sequence in the WHERE clause... 3

3. Avoid using '*' in the select clause '*'...

4. Reduce the number of database accesses...

5. Use the decode function to reduce processing time...

6. Simple Integration, no associated database access...

7. Delete duplicate records...

8. Replace Delete with truncate.

9. Try to use commit as much as possible.

10. Calculate the number of records...

11. Replace having clause with the WHERE clause...

12. Reduce table queries...

13. Improve SQL efficiency through internal functions ..

14. Use the table alias (alias ).

15. Replace in with exists.

16. replace not in with not exists.

17. Replace exists with table join.

18. Replace distinct with exists.

19. Using indexes to improve efficiency...

20. Force Index failure...

21. Avoid using computation on index columns ....

22. Automatic index selection...

23. Avoid using not in the index column.

24. Replace with> =>.

25. replace or with Union (applicable to index columns ).

26. replace or with in.

27. Avoid using is null and is not null in the index column.

28. Always use the first column of the index...

29. Replace union with Union-all (if possible ).

30. replace order by with where.

31. Avoid changing the index column type... 21

32. Where clause to be careful... 22

33. Optimized group by. 23

34. Separating tables and indexes... 24

35. SQL statement analysis tool... 24

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.