Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

DBE_ILM

Updated on 2024-08-20 GMT+08:00

Interface Description

Implements ILM policies, ILM policy evaluation, and interface for stopping compression jobs.

Table 1 DBE_ILM

Interface

Description

EXECUTE_ILM

Evaluates the specified data and ILM policy based on parameters. If the evaluation is passed, the corresponding compression job is generated.

STOP_ILM

Stops a compression job that is being executed based on parameters.

  • DBE_ILM.EXECUTE_ILM

    Evaluates the ILM policy based on parameters. The prototype is as follows:

    1
    2
    3
    4
    5
    6
    7
    DBE_ILM.EXECUTE_ILM (
    schema_name         IN     VARCHAR2,
    object_name         IN     VARCHAR2,
    task_id             OUT    Oid,
    subobject_name      IN     VARCHAR2 DEFAULT NULL,
    policy_name         IN     VARCHAR2 DEFAULT ILM_ALL_POLICIES, 
    execution_mode      IN     NUMBER DEFAULT ILM_EXECUTION_ONLINE);
    
    Table 2 DBE_ILM.EXECUTE_ILM parameters

    Parameter

    Description

    schema_name

    Schema to which an object belongs.

    object_name

    Object name.

    task_id

    Descriptor ID of the generated ADO task.

    subobject_name

    Name of a data subobject.

    policy_name

    Policy name. You can query the GS_ADM_ILMOBJECTS view to obtain the policy name. The default value DBE_ILM.ILM_ALL_POLICIES indicates all policies on the object.

    execution_mode

    Execution mode. The online mode (ILM_EXECUTION_ONLINE) or offline mode (ILM_EXECUTION_OFFLINE) is not involved in this phase.

  • DBE_ILM.STOP_ILM
    Stops an ILM policy that is being executed based on parameters. The prototype is as follows:
    1
    2
    3
    4
    DBE_ILM.STOP_ILM (
    TASK_ID                IN NUMBER DEFAULT -1,
    P_DROP_RUNNING_JOBS     IN BOOLEAN DEFAULT FALSE,
    P_JOBNAME         IN VARCHAR2 DEFAULT NULL);
    
    Table 3 DBE_ILM.STOP_ILM parameters

    Parameter

    Description

    TASK_ID

    Descriptor ID of an ADO task.

    P_DROP_RUNNING_JOBS

    Determines whether to stop a task that is being executed. The value true indicates that the task is forcibly stopped, and the value false indicates that the task is not stopped.

    P_JOBNAME

    Task name.

    NOTE:

    When there are a large number of concurrent requests and you run DBE_ILM.STOP_ILM, the system may display the message "Resources are busy, please try again later." In this case, try again later.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
gaussdb=# ALTER DATABASE set ilm = on;
gaussdb=# CREATE Schema ILM_DATA;
gaussdb=# SET current_schema=ILM_DATA;
BEGIN
    DBE_ILM_ADMIN.DISABLE_ILM();
    DBE_ILM_ADMIN.CUSTOMIZE_ILM(1, 15);
    DBE_ILM_ADMIN.CUSTOMIZE_ILM(2, 30);
    DBE_ILM_ADMIN.CUSTOMIZE_ILM(11, 1);
    DBE_ILM_ADMIN.CUSTOMIZE_ILM(12, 10);
    DBE_ILM_ADMIN.CUSTOMIZE_ILM(13, 1024);
    DBE_ILM_ADMIN.CUSTOMIZE_ILM(14, 240);
    DBE_ILM_ADMIN.ENABLE_ILM();
END;
/
-- 1.1.2 prepare test data
gaussdb=# CREATE SEQUENCE ILM_DATA.ORDER_TABLE_SE_ORDER_ID MINVALUE 1;
gaussdb=# CREATE OR REPLACE PROCEDURE ILM_DATA.ORDER_TABLE_CREATE_DATA(NUM INTEGER) IS
BEGIN
    FOR X IN 1..NUM
        LOOP
            INSERT INTO ORDER_TABLE VALUES(ORDER_TABLE_SE_ORDER_ID.nextval, 'Snack gift basket A', NOW());
        END LOOP;
    COMMIT;
END;
/
-- 1.1.3 normal procedure
-- 1.1.3.1 evaluate successed - all policy
gaussdb=# CREATE TABLE ILM_DATA.ORDER_TABLE (ORDER_ID INT, GOODS_NAME TEXT, CREATE_TIME TIMESTAMP)
    WITH (STORAGE_TYPE=ASTORE) ILM ADD POLICY ROW STORE COMPRESS ADVANCED ROW AFTER 1 DAYS OF NO MODIFICATION;
BEGIN
    ILM_DATA.ORDER_TABLE_CREATE_DATA(5);
    PERFORM PG_SLEEP(2);
END;
/

gaussdb=# SELECT ORDER_ID, DBE_COMPRESSION.GET_COMPRESSION_TYPE('ilm_data', 'order_table', ctid::text, NULL) FROM ILM_DATA.ORDER_TABLE;
 order_id | get_compression_type 
----------+----------------------
        1 |                    1
        2 |                    1
        3 |                    1
        4 |                    1
        5 |                    1
(5 rows)

gaussdb=# SELECT ORDER_ID, DBE_HEAT_MAP.ROW_HEAT_MAP('ilm_data','order_table', NULL, ctid::text) FROM ILM_DATA.ORDER_TABLE;
 order_id |                 row_heat_map                  
----------+-----------------------------------------------
        1 | (ilm_data,order_table,,,16799,16799,"(0,1)",)
        2 | (ilm_data,order_table,,,16799,16799,"(0,2)",)
        3 | (ilm_data,order_table,,,16799,16799,"(0,3)",)
        4 | (ilm_data,order_table,,,16799,16799,"(0,4)",)
        5 | (ilm_data,order_table,,,16799,16799,"(0,5)",)
(5 rows)

DECLARE
    v_taskid number;
BEGIN
    DBE_ILM.EXECUTE_ILM(OWNER        => 'ilm_data',
                        OBJECT_NAME    => 'order_table',
                        TASK_ID        => v_taskid,
                        SUBOBJECT_NAME => NULL,
                        POLICY_NAME    => 'ALL POLICIES',
                        EXECUTION_MODE => 2);
    RAISE INFO 'Task ID is:%', v_taskid;
END;
/
INFO:  Task ID is:1

gaussdb=# SELECT ORDER_ID, DBE_COMPRESSION.GET_COMPRESSION_TYPE('ilm_data', 'order_table', ctid::text, NULL) FROM ILM_DATA.ORDER_TABLE;
 order_id | get_compression_type 
----------+----------------------
        1 |                    1
        2 |                    1
        3 |                    1
        4 |                    1
        5 |                    1
(5 rows)

gaussdb=# CALL DBE_ILM.STOP_ILM(-1, true, NULL);
 stop_ilm 
----------

(1 row)

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback