How to tell if a query will scale well?

前端 未结 5 1017
轮回少年
轮回少年 2021-02-09 01:09

What are some of the methods/techniques experienced SQL developers use to determine if a particular SQL query will scale well as load increases, rows in associated tables increa

5条回答
  •  不思量自难忘°
    2021-02-09 01:42

    In addition (and along the same lines) to Robert's suggestion, consider the execution plan. Is it utilizing indexes? Are there any scans or such? Can you simply for the query in any way? For example, Eliminate IN in favor of EXISTS and only join to tables you need to join to.

    You don't mention the technology -- keep in mind that different technologies can affect the efficiency of more complex queries.

提交回复
热议问题