- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2022 08:10 PM
Is it possible to measure the approximate size of one record in a table by the following method?
<Measurement method>
Check the difference between the Primary DB size (MB) of the Application Usage Overview before and after adding the record to the table.
* Create 10,000 records and divide the difference by 10,000
Is the Primary DB size (MB) reflected immediately after adding a record?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2022 12:03 AM
MySQLに一般的にテーブルを作成した話になります。
varcharがemptyの場合は0バイトになります。
Integerは4バイト
Date/Timeは8バイト
ReferenceはGUIDなので32バイト
Floatは4バイト
因みに次ぎのNow Support記事によると40文字以下はvarchar(40)です。
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0685779
ただし、ServiceNowのテーブルとデータベースのテーブルは異なる場合があります。
データベースのテーブル名はsys_storage_aliasテーブルで見ることができます。列Storage table nameがデータベースのテーブルで、列TableはServiceNow上での論理テーブルのようです。例えば、cmdbを継承したテーブルは実際はすべて物理テーブルcmdbにあります。baseテーブルは物理テーブルで、extendedテーブルはbaseテーブル内に作成されているようです。
実際には分かりませんが、extendedテーブルは物理テーブルで列で識別されているように見えます。
次ぎのNow SupportページにTaskテーブルについての説明があります。
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0713626
話は最初に戻りますが、何故レコード長が必要なのでしょうか?
ServiceNowのようなaPaaSの利点は色々なミドルウエア技術が隠蔽されていてアプリのみに集中することであると思います。ServiceNowから提供されちるベストプラクティスに基づいて作成/運用して、それで問題が発生した場合はServiceNowに改善も求めることが出来ます。

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2022 08:25 PM
Hi Yuki,
I think you have asked this question before as well and got your answer too:
https://community.servicenow.com/community?id=community_question&sys_id=f2d7b5cd1b8849d01e579979b04bcb0e
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2022 09:36 PM
Database like MySQL and Oracle supports VARCHAR column type. That is, a column length is varies depending on the size of the entered data. Size of TEXT columns also varies depending on the size of the entered data.
Since String is commonly used type in ServiceNow tables, size of a record would change with each record.
As such, trying to measure the "approximate" size won't mean too much. It would be better to try to find maximum size of a record and mean or average size of a record. Can get these values from calculating number of characters entered in each columns.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2022 10:37 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2022 12:03 AM
MySQLに一般的にテーブルを作成した話になります。
varcharがemptyの場合は0バイトになります。
Integerは4バイト
Date/Timeは8バイト
ReferenceはGUIDなので32バイト
Floatは4バイト
因みに次ぎのNow Support記事によると40文字以下はvarchar(40)です。
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0685779
ただし、ServiceNowのテーブルとデータベースのテーブルは異なる場合があります。
データベースのテーブル名はsys_storage_aliasテーブルで見ることができます。列Storage table nameがデータベースのテーブルで、列TableはServiceNow上での論理テーブルのようです。例えば、cmdbを継承したテーブルは実際はすべて物理テーブルcmdbにあります。baseテーブルは物理テーブルで、extendedテーブルはbaseテーブル内に作成されているようです。
実際には分かりませんが、extendedテーブルは物理テーブルで列で識別されているように見えます。
次ぎのNow SupportページにTaskテーブルについての説明があります。
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0713626
話は最初に戻りますが、何故レコード長が必要なのでしょうか?
ServiceNowのようなaPaaSの利点は色々なミドルウエア技術が隠蔽されていてアプリのみに集中することであると思います。ServiceNowから提供されちるベストプラクティスに基づいて作成/運用して、それで問題が発生した場合はServiceNowに改善も求めることが出来ます。