Best Practice in SQL

原创 2012年03月28日 14:26:00

1)      Avoid searching based on concatenation

Select * from employee where empno || name = ’1234qiao’

Select * from employee where empno=1234 and name = ’qiao’

2)      It is advisable to put the table that returns the fewest rows at the end of the From list.

Select * from table1, table2

Table1 – contains 10000,               Table2 – contains 100

3)      If more than one table is used in a query, then it is advisable to use table aliases, as it would enhance the speed of parse phase of the query.

4)      Avoid using NOT or != operators, it causes full table scan.

5)      Using EXISTS instead of IN when the selective filters are in parent query.

6)      Using IN instead of EXISTS when the selective filters are in sub query.

版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

决胜Spark大数据时代企业级最佳实践:Spark Core&Spark SQL&GraphX&Machine Learning&Best Practice

王家林:Spark、Docker、Android技术中国区布道师。 联系邮箱18610086859@126.com  电话:18610086859  QQ:1740415547  微信号:18...

vSphere Best Practice

  • 2016-02-28 03:17
  • 1.91MB
  • 下载

core.j2ee.patterns.best.practice

  • 2016-03-24 07:03
  • 3.10MB
  • 下载

AsyncHttpClient Best Practice

AsyncHttpClient是一款开源的Java异步Http和WebSocket 客户端官方原文 Asynchronous Http and WebSocket Client library f...

ASP.NET WebForm Best Practice 之PostBack

http://www.cnblogs.com/hjf1223/archive/2008/01/03/1024969.html关于PostBack,我曾经也写过一篇博客《深入理解 __doPostBac...
  • plean
  • plean
  • 2011-07-04 14:13
  • 266

DBA_Best_Practice_ebook.pdf

  • 2009-08-04 21:37
  • 791KB
  • 下载

Maven私服(Best Practice - Using a Repository Manager)

Maven私服(Best Practice - Using a Repository Manager)A repository manager is a dedicated server applic...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)