What's the size of sys_audit table, and how many columns it has?

SukanyaP
Tera Contributor

Hi Team,

Kindly provide me those information:
1. What's the size of sys_audit table, and how many columns it has?

2. Whether there is some row filtering applied on this table in ServiceNow API?

3. What is the timeout set on API (should be 60 seconds)?

Can you please provide the above information.

 

BR,

Sukanya.P

3 REPLIES 3

Murthy Ch
Giga Sage

Hello @SukanyaP 

I don't think we will be able to identify the size of the table's in ServiceNow. I think it will be taken care by SN.

Thanks,
Murthy

Community Alums
Not applicable

Hi @SukanyaP ,

The Now Platform tracks inserts and updates to audited records in the Sys Audit (sys_audit) and Audit Relationship Change (sys_audit_relation) tables.

The Now Platform tracks audit tables. To track tables, select the Audit check box in the dictionary record to set the value to true. By default, it does not audit records from system tables, such as update sets tables.

 

Here's you can check your questions, I tried to answer them 

 

1. What's the size of sys_audit table, and how many columns it has?

 

The size in my PDI for sys_audit table is around 42,000. Here's the column for the table below 

 
The following columns appear in the sys_audit table records:
 
 Field Description
Table nameTable that the audit record is for (for example, "incident")
Field nameColumn in the table that the audit record is for (for example, "assigned_to")
Document keySys_id (Unique Record Identifier) for the originating record associated with the audit record.
User

Name of the user who created the change.

Note: Some automated processes use the system or guest user to apply and track changes to records. For more information, see System and guest users.
Old value

Old value of the field change represented by this sys_audit record.

  • Reference fields: Unique sys_id value of the changed record.
  • Date and time fields: Value in Coordinated Universal Time (UTC) as stored in the database.
New value

New value of the field change represented by this sys_audit record.

  • Reference fields: Unique sys_id value of the changed record.
  • Date and time fields: Value in Coordinated Universal Time (UTC) as stored in the database.

 

2. Whether there is some row filtering applied on this table in ServiceNow API?

Yes you can apply row filtering on this table 

 

3. What is the timeout set on API (should be 60 seconds)?

 

The timeout of a call is the total time available for a request to be processed and answered. When a request is received but the backend doesn’t send a response within the available time, the call is aborted and an error (504) is returned.

 

The default is 60 seconds. A value of 180 seconds should be enough for most instances to allow queries to complete, although bigger values may be needed in some cases. This value should then be reset to the default value after the scan has completed.

 

I hope I'm able to answer all your questions

 

Please mark my answer correct and helpful if this works for you

 

Thanks and Regards 

Sarthak

Sohail Khilji
Kilo Patron
Kilo Patron

Hi @SukanyaP ,

 

Below are your queries addressed :

 


1. What's the size of sys_audit table, and how many columns it has?

 

Usually the size of sys_audit table lies on the top of stats when you lookinto your space consumption reason being numerous fields being audited day today.

 

Lets say you have 20 fields, and record is getting updated 5 times, then system creates 20  * 5 = 100 entries in audit table assuming that all the fields are being audited for this table.

 

Now since you want to delete the audit, then it raises the question on " do you want to really audit all the fields on this table ? ", there might be some fields which might be getting update frequntly but does not necessarily meant to be audited, you can exclude those fields by addiing "no_audit=true" attribute on the dictionary entry of that particular field.

 

So, The size of sys_audit table depends on how you cleanly you manage it and audit what you wanted to keep track off. When it comes to Field on sys_audit table the common fileds are table name , old value , new value , user , updated and created etc...

 

2. Whether there is some row filtering applied on this table in ServiceNow API?

I do not understand what do you mean by row filtering ? 

 

3. What is the timeout set on API (should be 60 seconds)?

60 is enough to use, but at certain retry you can increase it up to 120 or more...

Can you please provide the above information.

 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect