You are viewing limited content. For full access, please sign in.

Question

Question

Increased SQL Wait Times When Performing Search in Monitor

asked on June 19, 2023

We have been trying to narrow down an issue that happens in one of our Forms instances for a few weeks now. We know it happens because we will receive Termination or Suspend emails from Forms. Today I received a handful of these emails and was able to check our SQL monitoring tool and saw high wait times around the same time I received the emails. Our SQL monitoring tool threw a warning for a 'blocking process' and I was able to see the SQL query that caused the blocking.

SELECT
[Extent4].[bp_instance_id] AS [bp_instance_id],
[Extent4].[has_error] AS [has_error],
[Extent4].[process_id] AS [process_id],
[Extent4].[process_name] AS [process_name],
[Extent4].[bp_id] AS [bp_id],
[Extent4].[initiator_ip_address] AS [initiator_ip_address],
[Extent4].[last_updated] AS [last_updated],
[Extent4].[start_date] AS [start_date],
[Extent4].[end_date] AS [end_date],
[Extent4].[is_archived] AS [is_archived],
[Extent4].[title] AS [title],
[Extent4].[snapshot_user_id] AS [snapshot_user_id],
[Extent4].[snapshot_username] AS [snapshot_username],
[Extent4].[snapshot_displayname] AS [snapshot_displayname],
[Extent4].[snapshot_sid] AS [snapshot_sid],
[Extent4].[snapshot_email] AS [snapshot_email],
[Extent4].[status] AS [status]
FROM [dbo].[cf_bp_main_instances] AS [Extent1]
LEFT OUTER JOIN (SELECT [main_instance_data].[bp_instance_id] AS [bp_instance_id], [main_instance_data].[has_error] AS [has_error], [main_instance_data].[process_id] AS [process_id], [main_instance_data].[process_name] AS [process_name], [main_instance_data].[bp_id] AS [bp_id], [main_instance_data].[initiator_ip_address] AS [initiator_ip_address], [main_instance_data].[last_updated] AS [last_updated], [main_instance_data].[start_date] AS [start_date], [main_instance_data].[end_date] AS [end_date], [main_instance_data].[is_archived] AS [is_archived], [main_instance_data].[title] AS [title], [main_instance_data].[snapshot_user_id] AS [snapshot_user_id], [main_instance_data].[snapshot_username] AS [snapshot_username], [main_instance_data].[snapshot_displayname] AS [snapshot_displayname], [main_instance_data].[snapshot_sid] AS [snapshot_sid], [main_instance_data].[snapshot_email] AS [snapshot_email], [main_instance_data].[status] AS [status] FROM [dbo].[main_instance_data] AS [main_instance_data]) AS [Extent2] ON [Extent1].[bp_instance_id] = [Extent2].[bp_instance_id]
INNER JOIN [dbo].[cf_user_snapshot] AS [Extent3] ON [Extent1].[user_snapshot_id] = [Extent3].[id]
LEFT OUTER JOIN (SELECT [main_instance_data].[bp_instance_id] AS [bp_instance_id], [main_instance_data].[has_error] AS [has_error], [main_instance_data].[process_id] AS [process_id], [main_instance_data].[process_name] AS [process_name], [main_instance_data].[bp_id] AS [bp_id], [main_instance_data].[initiator_ip_address] AS [initiator_ip_address], [main_instance_data].[last_updated] AS [last_updated], [main_instance_data].[start_date] AS [start_date], [main_instance_data].[end_date] AS [end_date], [main_instance_data].[is_archived] AS [is_archived], [main_instance_data].[title] AS [title], [main_instance_data].[snapshot_user_id] AS [snapshot_user_id], [main_instance_data].[snapshot_username] AS [snapshot_username], [main_instance_data].[snapshot_displayname] AS [snapshot_displayname], [main_instance_data].[snapshot_sid] AS [snapshot_sid], [main_instance_data].[snapshot_email] AS [snapshot_email], [main_instance_data].[status] AS [status] FROM [dbo].[main_instance_data] AS [main_instance_data]) AS [Extent4] ON [Extent1].[bp_instance_id] = [Extent4].[bp_instance_id]
WHERE ( EXISTS (SELECT
1 AS [C1]
FROM [dbo].[cf_bp_processes] AS [Extent5]
WHERE (CASE WHEN ([Extent5].[bp_id] IS NOT NULL) THEN [Extent5].[bp_id] ELSE -1 END IN (5)) AND (CASE WHEN ([Extent5].[bp_id] IS NOT NULL) THEN [Extent5].[bp_id] ELSE -1 END IS NOT NULL) AND ([Extent5].[process_id] = [Extent1].[process_id])
)) AND (99 <> [Extent1].[status]) AND (([Extent1].[title] LIKE N'%2732486A%') OR (([Extent3].[displayname] LIKE N'%2732486A%') AND ([Extent3].[user_id] > 0)) OR ([Extent3].[username] LIKE N'%2732486A%') OR (( EXISTS (SELECT
1 AS [C1]
FROM [dbo].[formatted_variables] AS [Extent6]
WHERE ([Extent1].[bp_instance_id] = [Extent6].[bp_instance_id]) AND ([Extent6].[attribute_id] IN (236, 264, 520, 186, 183, 184, 185))
)) AND ( EXISTS (SELECT
1 AS [C1]
FROM [dbo].[formatted_variables] AS [Extent7]
WHERE ([Extent1].[bp_instance_id] = [Extent7].[bp_instance_id]) AND ([Extent7].[value_string] LIKE N'%2732486A%')
))))
ORDER BY [Extent1].[lastacted_date] DESC, [Extent1].[start_date] DESC
OFFSET 0 ROWS FETCH NEXT 20 ROWS ONLY

I have been able to see a few other SQL queries that are very similar to the one above that correlate with the time we receive the termination/suspend email notifications.

We were able to find out which user performed the search and discovered that they were performing a search in Monitor. They did not have any of the filters on the left selected and all the drop-down filters were set to 'All'. They then put in the value they were searching for that caused the high wait times.

Is there anything that can be done to prevent this happening in the future?

Forms 11.0.2212.30907

0 0

Replies

replied on June 20, 2023

The query indicates a search in monitor page. And the search query includes searching in some variable values.

FROM [dbo].[formatted_variables] AS [Extent6]

WHERE ([Extent1].[bp_instance_id] = [Extent6].[bp_instance_id]) AND ([Extent6].[attribute_id] IN (236, 264, 520, 186, 183, 184, 185))

It seems that some variables are added as columns in monitor page. The search on monitor page will search against all shown columns in the table.  Sometimes it can be slow if your variable data amount is large.

 

To prevent this kind of query, you can remove the added variables columns and see if the issue happened again.

1 0
replied on June 20, 2023

I think that's the part I was missing, that they had added variables as columns in Monitor. I have had them remove the variable columns and we will see if that helps resolve the issue. Thank you.

0 0
replied on September 26, 2023

We continue to have issues with these searches where an end user has added variables as columns when searching Monitor. Is there any way to make the query more efficient?

0 0
replied on September 27, 2023

Hi Black, could you work with your solution provider to open a support case and provide some details on your issues are, we probably need more info on your database table statistics  to investigate on this kind of issue.

0 0
replied on September 29, 2023

Yes, a support ticket has been opened with our Solution Provider.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.