Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Analysis of initialization parameters of domestic Database Dameng Database (DM7)

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

When initializing a database instance, domestic Dameng Database (DM7) will involve the configuration of database identity such as port number, as well as initialization of parameters such as page size and character set. Some of these parameters act in the whole lifecycle of the database instance and cannot be modified once initialized. In the process of actual use, the differences of these parameters may have different effects on data storage, query, grouping and so on. According to the description of official documents, practical experience and summary of test examples, this paper mainly expounds the different effects brought by different parameter values.

1. Page size (PAGE_SIZE)

Database instance page size

String column defines the actual maximum length

4K

1900

8K

3900

16K

8000

32K

8188

3. Case sensitive (CASE_SENSITIVE)

Identifiers are case sensitive. When case-sensitive, lowercase identifiers are enclosed by "", otherwise they are automatically converted to uppercase by the system; when case-insensitive, the system does not convert the case of identifiers, nor can they be case-sensitive when comparing identifiers. In popular terms, it is the same regardless of case when case-insensitive; when case-sensitive, only the content in "" is strictly case-sensitive, and the rest will be converted to uppercase by default.

In the following figure example, if the table name is case-sensitive, the table name will be converted to uppercase by default because there are no double quotes. C3 and Cc4 with double quotation marks in the field will maintain the original case and the corresponding content can only be queried using the definition.

In the following figure example, when the table name, column name, and string content are case-insensitive, all cases are ignored, regardless of uppercase, lowercase, double quotation marks or not.

4. Character set coding (CHARSET/UNICODE_FLAG)

Character set options. Values: 0 for GB18030, 1 for UTF-8, and 2 for Korean character set EUC-KR. The default is 0.

5. Whether the length of VARCHAR type is in characters (LENGTH_IN_CHAR)

1 or Y: yes, the length of all VARCHAR type objects is in characters. In this case, the definition length is not really adjusted according to the character length, but the storage length value is enlarged according to the theoretical character length. So it is also allowed that the actual number of characters that can be inserted exceeds the defined length. At the same time, the upper limit of the stored byte length of 8188 remains unchanged, that is, even if the column length is defined as 8188 characters, the actual string that can be inserted cannot exceed 8188 of the total byte length.

0 or N: no, the length of all VARCHAR type objects is in bytes. The default is 0.

This parameter affects only the VARCHAR data type, not the CHAR type.

When length_in_char=0, the varchar type column is stored in bytes, and the c2 column varchar (10) in the following illustration stores up to 10 bytes.

When length_in_char=1, the varchar type column is stored in characters (that is, 2 bytes), and the c2 column varchar (10) in the following illustration stores up to 20 bytes.

6. Space filling mode (BLANK_PAD_MODE)

Sets whether the trailing space filling mode is compatible with ORACLE when comparing strings. Value: 1 is compatible; 0 is incompatible. The default is 0.

In popular terms, it is whether the strings'a 'and' a 'are strictly distinguished when comparing, count, and so on.

When BLANK_PAD_MODE=0, except for the strict distinction between grouping operations such as group by, other operations such as comparison and count do not strictly distinguish between'a 'and' a', and the two strings are considered to be equal, as shown in the example below.

When BLANK_PAD_MODE=1, all operations strictly distinguish between'a 'and' a', as shown in the following figure example.

In addition to the above parameters will affect the specific use, there are default encryption algorithm, default HASH algorithm, root key encryption engine, full-library encryption algorithm, whether to use the improved character type HASH algorithm (USE_NEW_HASH) and other parameters are not allowed to be modified during the instance lifecycle. These parameters only require consistency during backup and restore, and have little impact on actual use. You can define them according to the requirements.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report