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

Speeding up flow? SQL Get rows approx 2000 items

I've made a flow that updates several fields based on a project number field that matches the input and the number from sql. See screenshots for details. This flow actually works but it takes forever to look through the 2000 rows to find the corresponding one. Any way to speed this up in flow?

 

2019-09-18_13-41-09.jpg2019-09-18_13-41-23.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User III
Dual Super User III

Hey @FH1000 

 

Yep. If the item that you have mentioned is a unique one i.e., there is only one item of the same ID that exists in SQL, you can try using the Get Row action too. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

5 REPLIES 5
Dual Super User III
Dual Super User III

Hi @FH1000 

 

Unfortunately for those many number of iterations it will definitley take time. There can be a few ways that you can make it faster by filtering out and extracting the rows that best match the item that is being created. 

 

I mean if the field that you are looking for in the SQL table starts with or ends with the field that you have in the SharePoint list. Let's assume that you have a column named Title in both SQL and SP. and when an item is created in SP, you can get rows from SQL and in the action do a filter query to get items that start with the title from SP. (makes sense?)

 

Please see the syntax here: https://veenstra.me.uk/2018/11/12/microsoft-flow-filter-queries-in-sharepoint-get-items/ (It is for SP but same goes on for SQL)

 

Supported commands for SQL: https://docs.microsoft.com/en-us/connectors/sql/

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

@yashag2255  indeed, actually managed to think of that myself 🙂 my project number is uniqe so i'm trying to filter on that and the flow works but it doesn seem to update the item anyway:

 

2019-09-18_14-42-25.jpg

Dual Super User III
Dual Super User III

Hey @FH1000 

 

I can see from the run that the Get Rows action has not returned anything (basically the filter query that you might have added has not matched any item and returned a null list). Now that there are no items returned in the Get Rows action, there is nothing to iterate on and hence the apply to each action was terminated (as success). 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

filter was bogus. works now thanks... the flow still takes a few seconds to run from the item is created thoug.... guess nothing to do about that

Dual Super User III
Dual Super User III

Hey @FH1000 

 

Yep. If the item that you have mentioned is a unique one i.e., there is only one item of the same ID that exists in SQL, you can try using the Get Row action too. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (5,666)