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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Very long time publishing al extension

(0) ShareShare
ReportReport
Posted on by 20

Hello,

I'm new in AL development and i've 2 extensions for BC. One is for all the tables extensions (new field, new tables, indexes) and one another for the logic.

My first extension is big, with more than 100 tables extensions, and 60 new tables. Every time i have a change to do on this extension, i have 2 hours for publishing it on the production database. The publication recreate every indexes, so it takes a long time even if I have a very small modified field on a single table. My question is, can i publish it without consuming this long time ?

i try the 'schemaUpdateMode option in the lauch.json with sync, forceSync, etc ... 

Thank for your help.

I have the same question (1)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,105 Moderator on at

    Are you in Business Central online or on prem?

  • TiamaT Profile Picture
    20 on at

    I'm on prem

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,105 Moderator on at

    Have you checked the performance monitor on your SQL server and your middle tier server when you do a publish?

    To me it looks like your servers are drained with resources.

  • TiamaT Profile Picture
    20 on at

    yes i see a lot of long request every time i publish.

    It's altering every time the indexes

    Message Action completed successfully, but it took longer than the given threshold.
    Execution time: 12304 ms
    Threshold: 750 ms
    Message: Long running SQL statement
    Task ID: 2
    Connection ID: 27
    SQL server session ID: 75
    Client Type: WebServiceClient
    Database Server Name: LOCALHOST
    Database Name: BC-xxxxxxxxx
    Current Company Name:

     Statement: IF EXISTS (SELECT * FROM sys.indexes idx WHERE idx.is_disabled = 1 AND idx.[name] = N'$ExtKey4' AND idx.object_id = OBJECT_ID(N'XXXXXXX$Sales Line$437dbf0e-84ff-417a-965d-ed2bb9650972'))

    ALTER INDEX "$ExtKey4" ON "SQLDATABASE".dbo."XXXXXXX$Sales Line$437dbf0e-84ff-417a-965d-ed2bb9650972" REBUILD;

    ....

    my database is over 500Gb with 8 companies, and it tooks 2 hours

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,105 Moderator on at

    And the time is also two hours even when you use schema update mode synchronize?

    You do not uninstall the extension for every publish you do?

  • Verified answer
    YUN ZHU Profile Picture
    95,329 Super User 2025 Season 2 on at

    Hi, Did you publish directly in VS Code?

    Have you tried using the Publish command in the Business Central Administration Shell?

    More details:

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-how-publish-and-install-an-extension-v2#to-publish-and-synchronize-an-extension

    Hope this helps.

    Thanks.

    ZHU

  • TiamaT Profile Picture
    20 on at

    yes that's it ! almost 10 sec with the sync-navapp cmdlet !

    thank you

    do you know why when i publish with vscode it took so long ?

  • Suggested answer
    YUN ZHU Profile Picture
    95,329 Super User 2025 Season 2 on at

    I'm sorry that I don't know the details. I encountered this problem during the NAV 2018 extension v1.
    Much faster from the Business Central Administration Shell.

  • TiamaT Profile Picture
    20 on at

    ok thank you for your answer , and for your website too, i found a lot of interesting informations ;)

  • Suggested answer
    Amit Baru Profile Picture
    3,037 on at

    Hi,

    Pls check you System processing speed and resources.

    Regards

    Amit Sharma

    www.erpconsultors.com

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,229

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans