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

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.

主站蜘蛛池模板: 商南县| 汉阴县| 东港市| 大竹县| 太和县| 天祝| 安龙县| 永福县| 油尖旺区| 威远县| 金门县| 丘北县| 兴和县| 元朗区| 旅游| 墨竹工卡县| 永川市| 鹿泉市| 广宁县| 长春市| 满洲里市| 潜江市| 丘北县| 武山县| 富宁县| 汾阳市| 闸北区| 射阳县| 兴和县| 霸州市| 延长县| 文安县| 牟定县| 孝昌县| 明光市| 荃湾区| 息烽县| 南丰县| 玉山县| 科尔| 新兴县|