web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Latency On-Premise Dat...
Power Automate
Unanswered

Latency On-Premise Data Gateway to SQL

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I want to use on-premises data gateway to connect Logic Apps with my SQL Server. The issue is that when I execute a SP, it takes like 10s. If I do it via SQL Management Studio it takes less than a 1ms.

 

My DBA tells that latency is due to a query that sends the gateway every time before my SP runs. Please it see below.

 

Anybody knows where this query comes from and how to avoid it?

 

Thanks in advance!

 

select r.[ROUTINE_SCHEMA], r.[ROUTINE_NAME], r.[ROUTINE_TYPE], p.create_date [CREATED_DATE], p.modify_date [MODIFIED_DATE], cast(e.value as nvarchar(max)) [DESCRIPTION]

from [INFORMATION_SCHEMA].[ROUTINES] r

join sys.schemas s on s.name = r.[ROUTINE_SCHEMA]

join sys.objects p on p.name = r.[ROUTINE_NAME] and p.schema_id = s.schema_id and p.parent_object_id = 0

left outer join sys.extended_properties e on p.object_id = e.major_id and e.minor_id = 0 and e.class = 1 and e.name = 'MS_Description'

 

 

 

 

Categories:
I have the same question (0)
  • GuillaumeS Profile Picture
    2 on at

    We have the same problem. This query takes from 2 to 13 seconds. It runs constantly several times each minute for each database. We have noticed it is much faster when running as system administrator. Obviously this is a very bad solution so we are considering centralizing the connection in a single, smaller database to avoid the impact of these queries.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 58

#2
David_MA Profile Picture

David_MA 53 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 36 Most Valuable Professional

Last 30 days Overall leaderboard