Troubleshooting issues with large tables in AR System
Symptom
You notice slowness in AR System when you perform specific actions related to the tables containing a large amount of data.
For example, you might notice slowness when you query the following forms:
- BMC.CORE:BMC_BaseElement
- HPD:Help Desk
- AR System Email Messages
Scope
- One or more users across multiple servers in a server group experience the symptom.
- The backend processes are affected instead of user activities.
Diagnosing and reporting an issue
Perform the following steps:
Task | Action | Steps | Reference |
---|---|---|---|
1. | Identify the inefficient SQL statement |
| |
2. | Check for Row-Level-Security | If you notice Row-Level-Security access control occurring, see the troubleshooting guide for Row-Level-Security queries. You can identify if Row-Level-Security access control is occurring by the following statements in the WHERE clause: Combined LIKES WHERE (((T4387.C1000000337 = 'user') OR (T4387.C1000000338 = 'user')) AND ((T4387.C2 = 'user') OR (T4387.C60600 LIKE '%;'user';%') OR (T4387.C60600 LIKE '%;0;%') OR (T4387.C60600 LIKE '%;20032;%') OR (T4387.C60600 LIKE '%;20225;%') OR (T4387.C60600 LIKE '%;13006;%') OR (T4387.C60600 LIKE '%;13007;%') OR (T4387.C60600 LIKE '%;13010;%') OR (T4387.C60600 LIKE '%;1000000463;%') OR (T4387.C60600 LIKE '%;20055;%') OR (T4387.C60600 LIKE '%;20313;%') OR (T4387.C60600 LIKE '%;1000000000;%') OR (T4387.C60600 LIKE '%;20315;%') OR (T4387.C60600 LIKE '%;20316;%') OR (T4387.C60600 LIKE '%;20061;%') OR RLS_Split/regex WHERE ((T1436.C2 = 'user') OR (T1436.C4 = 'user') OR EXISTS(SELECT 1 FROM(SELECT Item FROM RLS_split(T1436.C60901, ';') UNION ALL SELECT Item FROM RLS_split(T1436.C112, ';') UNION ALL SELECT Item FROM RLS_split(T1436.C60989, ';') UNION ALL SELECT Item FROM RLS_split(T1436.C60900, ';')) privs join RLS_split '1000000023;1000000024;1000000021;1000000027;804;0;1058;20078;20055;20077;20032;', ';') u ON privs.Item = u.Item)))... Or ...WHERE ((T3610.C2 = 'user') OR (T3610.C4 = 'user') OR (EXISTS (SELECT TO_CHAR(item) FROM (SELECT regexp_substr(str, '[^;]+', 1, rownum) item FROM (SELECT '''user'';0;-20225;-20213;-20000;440;803;804;1058;13006;13007;13010;20000;20003;20031;20032' str FROM dual) CONNECT BY level <= length (regexp_replace (str, '[^;]+')) + 1) u_privs WHERE item IS NOT NULL INTERSECT ( SELECT TO_CHAR(regexp_substr (T3610.C112, '[^;]+', 1, rownum)) item FROM dual CONNECT BY level <= length (regexp_replace (T3610.C112, '[^;]+')) + 1) ) OR... | |
3. | Check for a custom workflow |
| |
4. | Identify if the tables in question are large | Use database tools to calculate the number of records and also the physical size of the tables. Alternatively, use a third-party tool, such as APL DB Size to get useful information. The results show that in this case, the TestForPerformance form that corresponds to T4064 contains 12.5 million records. Note that T4065 was a join of T4064. Therefore, the same underlying table is the root cause of performance issues. To find the Form ID, right-click the form name and then select Show Form Details. Prefix the Form ID with a T to get the table name, for example, T4064 in this case. In this example, T4064 is the underlying table for the TestForPerformance form. | |
5. | Determine if the table size is the cause of poor performance | In many cases, the size of a table is not an issue and you might need to use another performance troubleshooting guide to resolve the issue. However, if you identify very large tables, you might want to prepare a plan to reduce the size of the tables in your production database. To identify if size is the problem, it might require a Database Administrator (DBA) to look at the database server statistics to check whether loading data pages from the disk for the table or consuming large amounts of memory is causing the performance issue. Alternatively, look at the long running SQL statements and see if they can help to understand the nature of the problem. Usually, the SELECT statement that efficiently uses indexes can perform well even if there is a huge data. The problem often is that the results set is large. Therefore, focus on the SQL statements that return a substantial amount of data. | |
6. | Consider options for reducing the size of the table | There are several ways to deal with large tables, depending on the nature of the table. Consider the retention policies at your organization before following any of these options: Important: Before making database changes, consult your DBA and make sure that a backup has been taken. We recommend to use the following options:
Alternatively, you can use the following options:
| |
7. | Find a solution |
| |
9. | Create a BMC Support case | Collect and send output of AR Log Analyzer and the detailed information when you create a case with BMC Support: Provide the following information as part of your case:
Attach any material or reports that are provided by the DBA. This includes Automatic Workload Repository (AWR), Automatic Database Diagnostic Monitor (ADDM), or Active Session History (ASH) reports, MS-SQL Profiler output, execution plans, and observations, etc. |
Resolutions for common issues
After you determine a specific symptom or an error message, use the following table to identify the solution:
Symptom | Action | Reference |
---|---|---|
In the database, attachment fields use a separate table to store data even though you use Oracle-Clob-Storage-In-Row. | NA Important: Oracle-Clob-Storage-In-Row doesn't affect attachment fields because they don't use CLOBs. | |
In AR System, archiving is very slow. | Check for the missing indexes. | |
In the SQL logs, queries against large tables are slow when you use Row-Level-Security. | Use the new Subquery Row Level Security (RLS) option. | |
Long text fields cause the database to grow very large. | Store CLOBs In-Row to reduce the size occupied in the database. |