Search code examples
excelbufferpowerquerym

Power Query Tabel.Buffer Correct Use


To improve load times from a SQL server and improve performance I tried the following:

In a query called SQL_Query I use

let 
Source = SQL.Databse(SomeSQLCode),
    BufferMyTabel = Table.Buffer(Source)
in
    BufferMyTabel

In another downstream query I just use

let 
Source = SQL_Query
more code
  1. Is that correctly buffering my SQL export for further use in my downstream queries?
  2. As long as I am not updating SQL_Query and keep Excel open, should that data just remain in memory to allow faster access?

Solution

  • No, that won't work.

    Your second query will issue another query of its own.

    Buffer can help if you are reusing data within the same query, like referencing the same set multiple times.

    Keep in mind in Power query there is a memory limit for the amount of data that will be put into memory, around 256MB, after that will start paging the data.

    Consider having a look at this link from Chris Webb for an example:

    improving-power-query-calculation-performance-with-list-buffer