Forum Discussion
How do I use table.buffer to speed up a query? (How do I create M code for table.buffer?)
- 6 years ago
Hi Anonymous
Table Buffer is not a magical function that will make every code run faster, it is beneficial in situations where you have small tables that you have to reiterate over and over again, the way it works is: it loads the specified table into the memory so it can be accessed there through the execution.
You can add an extra step in your code like:
step = Table.Buffer( previous step or table )and later refer to this "step" in the following steps.
If this table is too big or you not iterating it multiple times, then it might result in worse performance.
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
Hi Anonymous
Table Buffer is not a magical function that will make every code run faster, it is beneficial in situations where you have small tables that you have to reiterate over and over again, the way it works is: it loads the specified table into the memory so it can be accessed there through the execution.
You can add an extra step in your code like:
step = Table.Buffer( previous step or table )
and later refer to this "step" in the following steps.
If this table is too big or you not iterating it multiple times, then it might result in worse performance.
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
- Anonymous6 years agoNot applicable
Thanks, how do I determine if my table is small or big? E.g. I have a table that is 1.2 million rows with out 25 columns. Would that be too large for table.buffer?
- lbendlin6 years agoSuper User
no, that's still ok. The bigger question is - how many times are you referencing that table in the same query?
- Anonymous6 years agoNot applicable
My table is very linear. I do step #1, then step #2, then step #3, then step #4...... Each step refers to the previous step only (e.g. I don't at step #4 go back to step #1). With that said would table.buffer not help my query from a speed perspective?