A drop of Performance testing-SQL Optimization 2

来源:互联网 发布:python开发环境搭建 编辑:程序博客网 时间:2024/05/15 11:44

 To continue with previous blog about SQL Optimization. How to do it better ,do need our effort on it for a long time. I just may provide some means to think about it. And I also want to exchange ideas with net friends.

 

 Item 2:

   WHERE clause  order list should also have a rule: we should put the condition which can filter out maximum records to the last position.AS SQL interpreter first to deal with this condition. In Oracle internal sections there are many complicated operation  when we end user who just do a simple SQL statement.

 

 Item 3:

   Please avoid using ‘*’ in SQL Statement. SQL interpreter meet across the symbol ‘*’ It will trigger to search related data dictionary. We know this process will also cost some time. Just to avoid using it when  in convenience when we want to get one data set . please list out the columns instead of ‘*’.

 

Item 4:

 To reduce database calls as many as possible.  To avoid this ,we can think about oracle built-in function that  when we create a process in oracle DB, we will  use cursor to get data set .  Why we do this thing like this, just to reduce DB calls. Its original principles are that: connection between one server is easier than connection between two or more servers( work stations).

 

 

  

0 0