cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ManuApo
Helper I
Helper I

Importing data - Which method will refresh my data quicker??

Hello all,

 

I've got a doubt, probably the answer is simple but I'm not sure about it.

 

I am looking to load/refresh my data in the quickest way possible. I have written a large sript in SQL that combines around 10 different tables from my database and creates also different temporary tables and in the end pulls out 3 tables. Because in Power BI you can not extract 3 different tables from 1 script, I am thinking of 2 different options to import my data, and I obviously want to use the quickest way. 

-Import the 3 tables separetly, using the same script, getting 3 different queries. Each query will have at the end, .... FROM #Table1    ..... FROM #Table2 ..... FROM #Table3...

 

-Combine the 3 final tables on my SQL script (APPEND). Import only 1 final table and then separate into 3 different tables in Power Query.

 

I am guessing that the second option will be the quickest one because it will only have to query the script one time to the database, whereas the first option will do it 3 times..

Am I right? 

 

Thanks for your time,

Manu

3 REPLIES 3
Greg_Deckler
Super User
Super User

@ManuApo You want to use the method that preservers "native query" functionality. So, in the last step of your query if you can right-click that step in APPLIED STEPS and View Native Query is not greyed out, then that means that all of the processing is being pushed back to the SQL Server and thus should be the most efficient.


@ me in replies or I'll lose your thread!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Learn Power BI 2nd Edition
Greg_Deckler
Super User
Super User

@ManuApo The fastest way should be to use SQL to create a view and then just select that view in Power Query. But I'm confused as to when you have 1 table and when you have 3.


@ me in replies or I'll lose your thread!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Learn Power BI 2nd Edition

Lets say I dont want to start creating views yet. This script I have is actually a stored procedure that produces multiple tables. From those tables I am interested to extract into Power BI 3 of them.

 

My question is if I should append these 3 tables into one table to just query the database one time and then separate the 3 tables in power query. Or query 3 times to the database using the same script except the last select statement which will extract each time one different table. 

 

Hope that is more clear

Helpful resources

Announcements
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors