Prepare - Fix performance issues Flashcards

1
Q

What is performance issues in Power BI?

A

Report: speed at which reports run (e.g., how quick tables interact or filters work)

Query: speed at which queries run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is query performance?

A

How fast a query performs a step (how fast it takes to retrieve and transform tables)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to optimise performance for each source?

A

Power BI can query data from different sources and you will need to adopt query performance tuning techniques for each source

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the two options to increase query performance?

A

Query folding

Query diagnostics

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the benefits of query folding?

A

More efficiency in refreshes: When you import data tables by using query folding, Power BI is better able to allocate resources and refresh the data faster because Power BI does not have to run through each transformation locally.

Automatic compatibility All DirectQuery and Dual storage mode data sources must have the back-end server processing abilities to create a direct connection, which means that query folding is an automatic capability that you can use.

N.b.= Data refresh more efficient in terms of resource utilisation and refresh duration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What relational database query actions can be folded?

A

If all transformations can be reduced to a single Select statement, then query folding can occur.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to check if a query is folded?

A

Check steps to view native queries

While query folding is one option to optimize performance when retrieving, importing, and preparing data, another option is query diagnostics

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Query diagnostics?

A

A feature which measures query performance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Why is query diagnostics important?

A

So you can determine bottlenecks when loading and transforming your data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How to use query diagnostics?

A

Start diagnostics
Stop diagnostics
View query steps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are some other techniques to optimise performance?

A

Process as much data at native data source (prepare it)
Use native SQL queries
Separate data and time if bound together: if tables have column with time and date bound together make sure you separate them

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does query folding work?

A

The Power Query mashup engine strives to achieve query folding whenever possible for reasons of resource efficiency.

Query folding reduces Power Query mashup engines work as the transformations are pushed to the data source.

Power Query leverages the capabilities of the robust relational database engines, that are built to cope with large volumes of data in the most efficient way.

Cannot be achieved = when query folding cannot be achieved—either partially or fully—the Power Query mashup engine must compensate by processing data transformations itself. This process can involve retrieving source query results, which for large datasets is very resource intensive and slow.
Can be achieved = significantly more efficient in terms of refresh duration and resource utilisation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How does query folding differ for different?

A

DirectQuery or Dual = for these storage mode tables Power Query queries MUST have Query Folding

Import = for import tables it MAY be possible to achieve Query Folding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does query folding impact data modelling?

A

Import mode: data refresh will take place efficiently for import model tables in terms of resource utilisation and refresh duration (e.g. quicker refresh time)

DirectQuery or Dual: Each DirectQuery model tables MUST be based on a Power Query query that can be folded

Incremental refresh: query folding makes incremental data refresh efficient in terms of resource utilisation and refresh duration. IF query folding can’t be achieved then Power Mashup will have to retrieve all rows to determine incremental changes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is query performance best practice?

A

Try to achieve efficiency in your data model designs by ensuring query folding occurs where possible.

Delegate as much processing to the data source as possible = discover which step is preventing query folding
Use a native SQL query =
Prepare and transformation data in the source = (a) use data warehouses with prepared data or (b) make sure you do as much cleaning in the data source (e.g. clean the excel first)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

When can query folding not occur?

A

Cannot occur with no back-end server processing abilities or compute engine, such as CSV or Excel files, don’t have query folding capabilities

Queries that rely solely on unstructured data sources

17
Q

What sources do not support query folding?

A

Most data sources that have the concept of a query language support query folding. These data sources can include relational databases, OData feeds (including SharePoint lists), Exchange, and Active Directory.

However, data sources like flat files, blobs, and web typically do not.

18
Q

Give a rough indication of performance improvements?

A

Full query folding = 30 secs
Partial query folding = 180 secs
No query folding = 361 secs

19
Q

Explain what information viewing a native query can give you?

A
  • Explains how much of a query is pushed back to a database
  • Cannot edit the native query: a) can only see how M has translated the request b) you could change the Select statement
  • Greyed out means partial or no query folding as query could not be translated (e.g., “Clean” transform has no equivalent in SQL)
20
Q

What is best practice with native queries?

A
  • Reorder query steps to maximise the query folding and make as many translate to database actions as possible (aim to remove as many greyed out steps as possible)
21
Q

What does query diagnostics help with?

A
  • Track the query time whilst authoring reports or refreshing a dataset
  • Useful when analysing speed of query folding
22
Q

Explain the characteristics of incremental refresh?

A
  • Suitable when working with large datasets
  • Keeps bulk of data static and only refreshes the most recent data
  • It reduces the load on the server during refresh
23
Q

What are the troubleshoots of incremental refresh?

A
  • Some data sources do not support it
  • In some cases the whole table will load if incremental refresh is not supported by the data source
  • Long refreshes may point to the data source not supporting incremental refresh
24
Q

Why would you configure data loading?

A
  • You may combine tables through merge and append and would only load the new table rather than include the duplicates as well
25
Q

What happens if error values appear in your query?

A
  • Error values alone don’t prevent queries from loading
  • You are notified about the number of error values for each query
  • The error values are loaded as blank values