官术网_书友最值得收藏!

Keeping it simple—The key to build a good query

Before you go on to the next chapter, an important concept needs to be kept in mind:

Tip

Keep it simple is the key to success to create queries efficiently.

Simplicity is in need everywhere in the current changing world. Wherever you make things complicated, you may find yourself in an awkward position to compete with others.

My slogan is: simple, simpler, the simplest.

I have a habit in query building: the last step for any new query would be checking to see if it is the simplest one. In this way, "keep it simple" would not only be kept in the already built query, but also helps new queries to be the simplest in the beginning.

By keeping a query as simple as possible, it will ensure that the system performance is not affected. It will also be a great help to the troubleshooting process. A short checklist for simplicity is as follows:

  • Other queries: Are there any other queries doing a similar job, and if yes, why does the new query need to be built?
  • Tables: Are there any tables that have not been used for the query?
  • Fields: Are there any fields that have not been used for the query?
  • Conditions: Are there any condition overlaps?

The list can be much longer. The meaning behind it is clear: there is a never ending battle to get rid of complications.

When you try this method and it becomes a routine, you will find that query building becomes an enjoyable process.

主站蜘蛛池模板: 临桂县| 和田县| 黔西县| 泸溪县| 包头市| 新乡市| 鄂伦春自治旗| 九龙城区| 达日县| 武宁县| 白玉县| 临西县| 五峰| 民县| 广丰县| 长乐市| SHOW| 陆川县| 阿勒泰市| 黑山县| 疏附县| 喀什市| 山阴县| 青冈县| 甘德县| 靖远县| 商河县| 惠来县| 临沧市| 白朗县| 山阳县| 岐山县| 安乡县| 富锦市| 海盐县| 科技| 涿鹿县| 纳雍县| 台湾省| 新余市| 雅安市|