Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sdukes_88
Frequent Visitor

SQL Collate causing lag?

Hi,

 

I am struggling with an issue I have.

 

We are a College which merged with another college and I am doing a chart with 3 years of student numbers. Easy right?

 

Trouble is 2014, 2015 & 2016 data (a) comes from one source and 2014 & 2015 (b) another source (the old college student numbers).

 

My data is a direct query into PowerBi via a SQL view and I have optimised the SQL query as much as I can.

 

(a) contains 1,160 summarised rows and (b) contains 74 summarised rows.

 

Because (b) came from a different SQL collation I am summarising (a) and using UNION ALL to join to (b) with COLLATE

 

My problem is when you add a slicer and try and select by site any data in (a) loads relatively OK in terms of speed but (b) data just lags and takes far too long from a SQL query/view which takes 6 seconds to run in SSMS.

 

I don't know what I can do to get the data working - any help appreciated!

 

Thanks

Simon

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @sdukes_88,

 

You can try to use query editor to analysis with these records and create a new table, then use analysed table as the source of slicer, it may improve the performance.

 

In addition, you can also try to modify the table structure to improve the performance.

 

Reference links:
How to make a union view execute more efficiently?

Cross Database Unions

 

Regards,
Xiaoxin sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @sdukes_88,

 

You can try to use query editor to analysis with these records and create a new table, then use analysed table as the source of slicer, it may improve the performance.

 

In addition, you can also try to modify the table structure to improve the performance.

 

Reference links:
How to make a union view execute more efficiently?

Cross Database Unions

 

Regards,
Xiaoxin sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.