Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CUBRIDMAN-230] add new parameter to unloaddb #531

Merged
merged 19 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions en/admin/migration.inc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ The following is [options] used in **cubrid unloaddb**.
--output-prefix=PREFIEX PREFIX for output files
--hash-file=FILE FILE for hash
--latest-image when dumping objects, it dumps the latest image of objects in data volumes.
-t, --thread-count=COUNT number of threads; default: 1 maximum: 127
--enhanced-estimates obtain the exact number of records in the table to unload; default: disabled
-v, --verbose enable verbose status messages
--use-delimiter use '"' where an identifier begins and ends
-S, --SA-mode stand-alone mode execution
Expand Down Expand Up @@ -166,6 +168,26 @@ The following is [options] used in **cubrid unloaddb**.

This option makes it to unload the latest image of objects in data volumes when unloading instances (the MVCC version is ignored and it does not refer to the log volumes). It may include uncommitted data and deleted data that has not been vacuumed.

.. option:: -t, --thread-count=COUNT

This option sets the number of threads to be used in the unload process. It is performed in parallel using as many threads as the specified COUNT value, which must be in the range of 0 to 127.
If this setting is omitted, it is the same as specifying COUNT as 1. If specified as 0, unloaddb does not operate in thread mode.
Even if thread mode is specified, if a table contains an Object type or a Set, MultiSet, or Sequence (List) type that contains an Object type, it will not operate in thread mode for that table.

::

cubrid unloaddb -t 4 demodb

.. option:: --enhanced-estimates

The -v option must be specified together.
When determining the number of records in the target table, this option obtains the actual number of records instead of relying on statistical information. Using this option may increase the execution time of unloaddb because doing so adds the time needed to calculate the number of records. Therefore, this option should be used with caution.

::

cubrid unloaddb --enhanced-estimates demodb


.. option:: -v, --verbose

This option displays detailed information on the database tables and records being unloaded while the unload operation is under way.
Expand Down
21 changes: 21 additions & 0 deletions ko/admin/migration.inc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ unloaddb
--hash-file=FILE 해쉬 파일이름
--latest-image 오브젝트 (객체)를 언로드할 때, 데이터 볼륨의 최신 이미지를 언로드합니다.
커밋되지않은 데이터와 제거되었지만 배큠되지 않은 데이터가 포함될 수 있습니다
-t, --thread-count=COUNT 사용할 쓰레드 개수를 지정; 기본값: 1 최대값: 127
--enhanced-estimates 언로드할 테이블의 정확한 레코드 건수 수집; 기본값 : 미적용
-v, --verbose 많은 상태 메시지를 출력
--use-delimiter 식별자 처음과 끝에 '"' 사용
-S, --SA-mode 독립 모드 실행
Expand Down Expand Up @@ -167,7 +169,26 @@ unloaddb
.. option:: --latest-image

인스턴스들을 언로드할 때 현재 데이터 볼륨의 가장 마지막 이미지에서 언로드한다. 커밋되지 않은 데이터나 삭제되었지만 배큠되지 않은 데이터가 포함될 수 있다. 이 옵션을 지정하면 MVCC 버전은 무시되며 로그 볼륨을 참조하지 않는다.

.. option:: -t, --thread-count=COUNT

사용할 쓰레드 개수를 지정하는 옵션으로, COUNT 개수 만큼의 쓰레드를 이용해서 병렬로 수행하도록 하며 COUNT는 0 이상, 127 이하의 범위여야 한다.
설정을 생략하면 1로 지정한 것과 같고, 만약 0으로 지정되면 쓰레드 방식으로 동작하지 않는다.
쓰레드 방식을 지정하더라도 테이블에 Object 타입 또는, Object 타입을 내재하는 Set, MultiSet, Sequence(List) 타입이 있는 경우에는 해당 테이블에 대해서는 쓰레드 방식으로 동작하지 않는다.

::

cubrid unloaddb -t 4 demodb

.. option:: --enhanced-estimates

언로드할 테이블의 정확한 레코드 건수 수집하는 옵션으로, -v 옵션을 함께 지정해서 사용해야 하며, -v 옵션을 사용하지 않는 경우 무시된다.
ctshim marked this conversation as resolved.
Show resolved Hide resolved
작업 대상 테이블의 레코드 수를 파악 할 때 통계 정보 대신 실제 값을 구한다. 이 옵션이 지정되면 레코드 수를 파악하기 위한 수행 시간이 추가되므로 언로드 수행시간이 길어질 수 있으므로 유의해서 사용해야 한다.

::

cubrid unloaddb --enhanced-estimates demodb

.. option:: -v, --verbose

언로드 작업이 진행되는 동안 언로드되는 데이터베이스의 테이블 및 인스턴스에 관한 상세 정보를 화면에 출력하는 옵션이다.
Expand Down
Loading