The Links table

Current version: 10.1

Sitecore maintains a database table called Links.The Links table stores all links between individual items across databases (Core, Master, Web) and language versions.

Sitecore updates this table based on events that are triggered when actions on items (item:copied, item:deleted, item:saved, item:versionRemoved) are triggered.

There are two implementations of the database provider for this table:

  • Sitecore.Links.DefaultLinkDatabase, Sitecore Kernel (the default)

    You can specify in which databases the links are stored. By default, each database stores its own links. It is possible to change which databases are used to store links by enabling Sitecore.LinkDatabase.Explicit.config file. There for each sitecore databases, you can configure a link database provider and point it to a connection string:

    <linkProvider key="<sitecore database name>"

    type="Sitecore.Data.$(database).$(database)LinkDataProvider, Sitecore.Kernel">          <param ref="dataApis/dataApi[@name='$(database)']" param1="<connection string name>" /> 

     </linkProvider>

  • SqlServerBatchLinkDatabase

    The main advantage of the SqlServerBatchLinkDatabase provider is storing new item links in Links table with help of batching. This improves performance considerably.

To use the SqlServerBatchLinkDatabase provider:

  • Enable the App_Config/Include/Examples/SqlServerBatchLinkDatabase.config.example file by removing the .example from the file name.

    Note

    When you enable the new provider, Sitecore removes all data from the Links table and the provider repopulates the table.

You may occasionally need to rebuild the Links table, for example, as part of the upgrade process.

To rebuild the Links table:

On the Sitecore Launchpad, open the Control Panel and in the Database section, click Rebuild link databases, select the Master and Core databases, and then click Rebuild.

Do you have some feedback for us?

If you have suggestions for improving this article,