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

On-Premises or Azure SQL

Hello,

 

Can anyone tell me if they know which method would perform faster? Power Apps to On-Prem SQL using a Gateway? or Power App to Azure SQL?

 

I have an app using the first method (Power Apps to On-Prem SQL using a Gateway). On the app start up it runs a few collections (some concurrent, some not). In some cases depending on the WiFi connection, internet speed, etc.. it can take up to 2 minutes to complete.

 

Here is an example of my code:

Set(
    varSpinner,
    true
);
Concurrent(
//Collect current completed issued audits
    ClearCollect(
        colCompIssuedAudits,
        '[dbo].[rprCompIssuedAudits]'
    ),
//Collect current audit schedule with count of completion frequency
    ClearCollect(
        colAuditSchedule,
        AddColumns(
            '[dbo].[rprAuditSchedule]',
            "IssueCount",
            LookUp(
                '[dbo].[rprCompIssuedAudits]',
                Id_AuditSchedule = '[dbo].[rprCompIssuedAudits]'[@AuditSchedule_Id],
                IssueCount
            ),
            "Audit",
            LookUp(
                '[dbo].[rprAudits]',
                Audit_Id = '[dbo].[rprAudits]'[@Id_Audit],
                Audit
            )
        )
    ),
//Collect restricted auditors    
    ClearCollect(
        colRestricted,
        '[dbo].[rprRestricted]'
    )
);
//Check if user is a restricted auditor
If(
    CountRows(
        Filter(
            colRestricted,
            Auditor = User().FullName
        )
    ) = 0,
//If true, select random schedule audit Id (Id_AuditSchedule) from audit colAuditSchedule filtering by IssueCount
    Set(
        varRandomAudit,
        First(
            Shuffle(
                Filter(
                    colAuditSchedule,
                    Or(
                        Frequency > IssueCount,
                        IsBlank(IssueCount)
                    )
                )
            )
        )
    ),
//If false, select random schedule audit it (Id_AuditSchedule) from colAuditSchedule filtering by area
    Set(
        varRandomAudit,
        First(
            Shuffle(
                Filter(
                    colAuditSchedule,
                    Cell = lblRestrictedAuditArea.Text
                )
            )
        )
    )
);
Concurrent(
//Patch random audit schedule Id to issued audit table (rprIssuedAudits) for historical purposes
    Set(
        varIssuedAuditId,
        Patch(
            '[dbo].[rprIssuedAudits]',
            Defaults('[dbo].[rprIssuedAudits]'),
            {
                AuditSchedule_Id: varRandomAudit.Id_AuditSchedule,
                Auditor: User().FullName,
                IssuedDateTime: DateTimeValue(
                    Text(
                        Now(),
                        DateTimeFormat.UTC
                    )
                )
            }
        ).Id_IssuedAudit
    ),
//Collect questions from random scheduled audit varible (varRandomAudit)
    ClearCollect(
        colQuestions,
        Filter(
            '[dbo].[rprAuditQuestions]',
            Active = true,
            Audit_Id = varRandomAudit.Audit_Id
        )
    )
);
If(
    User().FullName = "AUG iPad",
    Set(
        varShowAuditInfo,
        true
    ),
    Set(
        varShowAuditInfo,
        true
    )
);
If(
    User().FullName = "AUG iPad",
    Set(
        varShowAuditInfo,
        false
    ),
    Set(
        varShowAuditInfo,
        true
    )
);
Set(
    varSpinner,
    false
)

Would it be better to move this to Azure SQL?

 

Thank you,

 

-Justair007

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @justair007 ,

 

To best of my knowledge, Azure SQL performance is always much better than SQL with on-prem with Gateway. I would say you will see an improvement of at least 40%. One more thing is when we have SQL on-prem we will have to consider maintenance downtime whereas in Azure it is always on and high availability.

 

See the below case studies:
https://ieeexplore.ieee.org/document/8618405
http://techgenix.com/azure-sql-or-sql-server-which-one-is-right-for-you/ 


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community. 

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Proud to be a Super User!

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

1 REPLY 1
Super User III
Super User III

Hi @justair007 ,

 

To best of my knowledge, Azure SQL performance is always much better than SQL with on-prem with Gateway. I would say you will see an improvement of at least 40%. One more thing is when we have SQL on-prem we will have to consider maintenance downtime whereas in Azure it is always on and high availability.

 

See the below case studies:
https://ieeexplore.ieee.org/document/8618405
http://techgenix.com/azure-sql-or-sql-server-which-one-is-right-for-you/ 


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community. 

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Proud to be a Super User!

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (88,069)