Listbuilder performance problems
Hi everyone! I've noticed a recurring problem with listbuilder performance. I will often have sql queries which will run instantly in SSMS directly against the database. However, once I put the sql into a TVFImplementation of a QueryViewSpec, the performance degrades terribly. The results can go from finishing in less than 1 second, to taking 3 or more minutes to complete.
I'm presuming this is because the spec creates a table-valued function, since when I select directly from the TVF in SSMS, I get the same poor performance as I see in CRM itself.
I'm curious if others encounter this same issue, and if there is anything that may help. TVFs have very limited coding options as compared to a stored proc (like datalists use).
Thanks in advance!
Comments
-
@Sam Giacco I agree this is a drawback of using listbuilders. To cope with this, when things start to get slow with a larger sql statement, and further indexing isn't making a dent, then I'll often try re-arranging some of the sql into “outer apply” and CTE statements to take the load off the main sql statement. If that doesn't work, then I might change my TVF definition to a fixed table definition so that I can use separate sql statements and table variables within the TVF, that way everything is not imposed on a single large sql statement / query plan.
e.g. instead of
create function dbo.USR_MY_FUNCTION ()
returns table
as return (
I'll use:
create function dbo.USR_MY_FUNCTION ()
returns @my_table table (ID uniqueidentifier……)
as begin
In the latter function I can define temp tables, e.g. declare @intermediary_table table (@NAME nvarchar…) and insert chunks of the solution into various table variables, then join things up in the end. Not as good as using temp tables in a stored procedure, but it can certainly help when the principal sql statement begins to struggle.
1 -
@Sam Giacco and now you've seen why products didn't replace every datalist with listbuilders! They are slow and generally not recommended for complex queries.
0
Categories
- All Categories
- 6 Blackbaud Community Help
- 209 bbcon®
- 1.4K Blackbaud Altru®
- 394 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 359 Blackbaud eTapestry®
- 2.5K Blackbaud Financial Edge NXT®
- 646 Blackbaud Grantmaking™
- 563 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 934 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.4K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 243 ResearchPoint™
- 118 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 238 The Tap (Just for Fun)
- 33 Blackbaud Community Challenges
- 28 PowerUp Challenges
- 3 (Open) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 779 Community News
- 2.9K Jobs Board
- 53 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)

