M Query Optimization
In the previous chapter, you were introduced to custom functions, appropriate planning for functions, and also using the power of parameters within your functions. Across Power Query, there are a number of opportunities for you to express and code solutions with your knowledge of M code.
Like with any coding language, there are different ways in which you can write out your code, meaning there are often strategies and techniques that can help you achieve the optimum performance of your query. In this chapter, you will dive deep into four key tips for optimizing your M queries:
- Filtering and reducing the data you’re working on to improve performance, such as removing unnecessary data early in the query
- Recognizing when to use functions optimized for specific tasks, reducing the need for custom code
- Employing lazy evaluation techniques and functions such as
Table.Buffer
andTable.Distinct
to optimize memory usage and processing - Using...