On a classic page, the Content Query web part is a tool for finding and displaying information. But, a downside to this web part is that it can impact the performance of your page. 

What affects the performance of the Content Query web part

Several factors affect the performance of the Content Query web part. Here are some examples:

  • A large list that contains more than 5000 items will take longer to query than a smaller list.

  • A cross-list query (that is, a query that spans multiple lists on one site or several sites) will take a long time to query. For example, on your company’s home site, you want to display the latest news items from lists that are maintained in multiple subsites. Each list contains 1000 items. That means that the Content Query web part will have to query across 3000 items.

  • Multiple filters, or filters on column types that are more complex. For example:

    • A query that filters on a site column of type Multiple lines of text is more complex than a query that filters on a site column of type Yes/No.

    • A filter that uses a contains condition is more complex than a query that uses an is equal to condition.

    • Multiple Or conditions increases the complexity of the query.

How to improve performance

We recommend replacing your Content Query web part with a Content Search web part. The Content Search web part is similar, but it queries search indexes so that it returns results much faster. Learn how to Configure a Content Search Web Part.

Another option, if you are using SharePoint in Microsoft 365, is to move from a classic page to a modern page, and use the Highlighted content web part. The Highlighted content web part is more visual, easier to set up, and works well on many types of devices.

If you do continue to use a Content Query web part, consider making these changes to improve performance:

  • Don't use a cross-list query. If you are using a cross-list query, consider whether it is possible to query one list instead of multiple lists, and/or lists on one site rather than multiple sites.

  • Reduce the number of items in your list. If possible, reduce the number of items in a list you are querying to fewer than 5000.

  • Simplify filtering. Reducing the number of filters you're using, or change the types of columns you filter on (see examples in the last three bullets in the section above).

More information

Using a Content Search web part instead of a Content Query web part

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Thank you for your feedback!