What should we do when SQL (and stored procedure) runs too slowly?
As the most commonly used data processing language, SQL is widely used in many scenarios, such as query and batch operating. When the amount of data is large, SQL (and stored procedure) often leads to very slow running. In this case, it needs to optimize SQL. To optimize SQL, there are some specific systemized ways. Normally, we need to check the execution plan first to find out the reason, and then recode in a targeted manner to achieve the purpose of optimization. For example, for the judgment of continuous numbers, we can use between to replace in, use the select
...