DELETE_VECTORS

保留有关已删除行的信息,以加速删除进程。

示例

从 Vertica 表中删除数据后,该数据将被标记为删除。要查看标记为待删除的数据,请查询 DELETE_VECTORS 系统表。

运行 PURGE 以从 ROS 容器中移除删除向量。

=> SELECT * FROM test1;
 number
--------
      3
     12
     33
     87
     43
     99
(6 rows)
=> DELETE FROM test1 WHERE number > 50;
 OUTPUT
--------
      2
(1 row)
=> SELECT * FROM test1;
 number
--------
     43
      3
     12
     33
(4 rows)
=> SELECT node_name, projection_name, deleted_row_count FROM DELETE_VECTORS;
    node_name     | projection_name | deleted_row_count
------------------+-----------------+-------------------
 v_vmart_node0002 | test1_b1        |                 1
 v_vmart_node0001 | test1_b1        |                 1
 v_vmart_node0001 | test1_b0        |                 1
 v_vmart_node0003 | test1_b0        |                 1
(4 rows)
=> SELECT PURGE();
...
(Table: public.test1) (Projection: public.test1_b0)
(Table: public.test1) (Projection: public.test1_b1)
...
(4 rows)

Ancient History Mark (AHM) 推进后:

=> SELECT * FROM DELETE_VECTORS;
 (No rows)

另请参阅