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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

SQL Timeout when filtering a view

(0) ShareShare
ReportReport
Posted on by 10

When filtering a view (adding the filter in the column) for contacts we do get SQL timeout error.

pastedimage1677237648703v1.png

However, it works when displaying the main view which shows all records.

And also works when doing an advanced find and adding same filter as applied in teh view

We display only 50 records per page,

Filtering the view seems to apply filter to all data, and not only a subsets of records, i woudl expect it retreives only a subset whish are the ones that will be displaye in teh view.

This is the featchXml call that fails, (no related entities)

/api/data/v9.0/contacts?fetchXml=<fetch version="1.0" output-format="xml-platform" mapping="logical" no-lock="false" returntotalrecordcount="true" page="1" count="50"><entity name="contact"><attribute name="entityimage_url"/><attribute name="parent_contactid"/><attribute name="fullname"/><attribute name="emailaddress1"/><attribute name="parentcustomerid"/><attribute name="telephone1"/><attribute name="statecode"/><attribute name="contactid"/><attribute name="sector"/><attribute name="segment"/><filter type="and"><condition attribute="sector" operator="eq" value="866140001"/>

I have the same question (0)
  • Verified answer
    Filipe Montezo Profile Picture
    Microsoft Employee on at

    Hello Jose, are you aware if any of this fields is a Computed Column or has a Leading wildcard? If yes, try to remove it or not add that as filter.

    For awareness, Computed Columns (and it's the same for Leading WC) are fields that are calculated on the fly, even before the filter is applied, which will always trigger a full table scan. It’s an expected behavior or by design.

  • JorgeSR Profile Picture
    10 on at

    Yes, using calculated columns

  • Suggested answer
    Filipe Montezo Profile Picture
    Microsoft Employee on at

    Try to remove them, it should solve the timeout issue. If the tables have millions of records, a full table scan will cause a timeout.

    Thank you.

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 Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 196 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 129

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans