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 Pages / CRUD operation with we...
Power Pages
Suggested Answer

CRUD operation with webapi is slow

(2) ShareShare
ReportReport
Posted on by 25
Hello everybody,
 
the website that I'm building uses virtual tables from SQL. I use webapi to perform CRUD operations but I noticed that it's very slow. A patch operation to update a column of a row in a table can take from 6 to 16 seconds. Some pages need to load data from several tables when open, which can take very long if open for the first time. Is it supposed to take this long? Is it this slow because I use virtual tables? Is there any way to reduce the loading time?

Thanks in advance for your answers.
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,960 Moderator on at
    There isn't any way for us to tell you.
     
    We have no access to your servers, or the networks or the gateway etc.
     
    I will see that YES virtual tables, especially if through gateways with lots of data can be slower, so you would need to enhance them to perform better
     
    If this helps please mark as yes
     
     
  • Suggested answer
    Inogic Profile Picture
    1,191 Moderator on at
    Hi,
     
    When using Power Pages with the Web API to perform CRUD operations on virtual tables, the performance can indeed be slower due to the real-time nature of virtual tables and the overhead introduced by the Power Platform’s API layer.
    Below are a few steps to help reduce the load time of API events
    • Batch API Requests:
      • Group multiple API operations into a single request to reduce the number of API calls.
    • Reduce Data Fetched:
      • Use $select to return only the necessary fields and $filter to retrieve only the needed rows.
    • Caching for Read-Heavy Operations:
      • Use server-side or client-side caching to avoid frequent API calls for static data.
    • Asynchronous (Lazy) Loading:
      • Load essential data first, and fetch additional data asynchronously as needed.
    • Background Processing for Long Operations:
      • Use background jobs or Power Automate for time-consuming updates like PATCH.
    • Optimize SQL Queries:
      • Ensure efficient SQL queries by using proper indexing and avoiding complex joins.
    • Server-Side Pagination:
      • Implement pagination using $top and $skip to load data in smaller batches.
    • Monitor API Performance:
      • Use tools like Application Insights to track and analyze API performance.
    • Preload Critical Data:
      • Pre-fetch key data in the background and store it locally for faster access.
    • Optimize Power Pages Configuration:
      • Minimize unnecessary page interactions that trigger Web API calls and reduce dependencies on virtual tables.
    Hope this helps.
     
    Thanks!
    Inogic Professional Services: Power Platform/Dynamics 365 CRM
    An expert technical extension for your techno-functional business needs
    Drop an email at crm@inogic.com 
    Service: https://www.inogic.com/services/ 
    Tips and Tricks: https://www.inogic.com/blog/ 
  • CU31070723-0 Profile Picture
    25 on at
    Could you tell me how to batch API requests?

    I have been using api commands in this format
     
    webapi.safeAjax({
              type: "PATCH",
              url: "/_api/{table logical name}s({GUID of row})",
              contentType: "application/json",
              data: ...
    });

    I found information on this page Execute batch operations using the Web API (Microsoft Dataverse) - Power Apps | Microsoft Learn but don't know how to write the code there in the "webapi.safeAjax({...})" format that I have been using.
  • CU31070723-0 Profile Picture
    25 on at
    We abandoned the virtual SQL tables to use only Dataverse tables and it's much much quicker and simpler!

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 Pages

#1
Lucas001 Profile Picture

Lucas001 17 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 12

#2
CN-06091549-0 Profile Picture

CN-06091549-0 12

Last 30 days Overall leaderboard