Sunday, 26 October 2014
Monday, 20 October 2014
HP Vertica
DB User:
Vertica Table
Sequence:
- User Creation
- GRANT USAGE ON SCHEMA PUBLIC
- Create Schema
- Grant usage privileges on a schema to the user
- Grant all privileges on a schema to the user
- Set default search path
- Change Vertica User Privileges from Existing User to New user
- Execute Permissions on User Defined Functions For New Users
- Grant Execute Permissions on ODBC
Vertica Table
- Creation
- Rename Table, Table Column Or View in Vertica
- Projection Creation
- Create A New Table Using Existing Table
- Create Table Partitions
- Change the Owner of Table
- Drop Partition
Sequence:
- Create Sequence Number
- Alter Sequence
- Drop Sequence
- Add Sequence Or Set Default value to a table
- Drop Default Or Sequence on a Table
- Change the Owner of Sequence
Vertica Sessions
Wednesday, 30 April 2014
Drop Partition
Using drop partition command we can drop the table partitions.
Syntax:
SELECT DROP_PARTITION ('<Table Name>',<Partition Name>,true)
Example:
SELECT DROP_PARTITION ('Sample',1,true)
See also: Create Table Partitions
Sample table with table partitions on ID Column:
Applying Drop partition command:
Data after applying drop partition command:
Creating Table Partitions
This post explains how to do the table partition with examples.
Vertica supports data partitioning at the table
level, which divides one large table into smaller pieces. Partitions are
a property of the table.
Example:
Table Creation script:
create table sample (id int,name varchar(10))
insert into sample values (1,'a');
insert into sample values (1,'b');
insert into sample values (1,'c');
insert into sample values (2,'a');
insert into sample values (2,'b');
insert into sample values (2,'c');
- I am going to create partitions based on ID Column. So first we need to set ID column as NOT NULL.
- Then run the table partition script
- Use below commands to check the table partition status. If partition reorganize status is 100% then partitioning is completed. If any error is happened then error table will populate.
select * from V_MONITOR.PARTITION_STATUS where table_name='sample'
select * from V_MONITOR.PARTITION_REORGANIZE_ERRORS where
table_name='sample'
See Also: Drop Partition
Wednesday, 16 April 2014
Set Default Search Path
Grant all Privileges on a Schema to the user
Grant Usage Privileges on a Schema to the user
Subscribe to:
Posts (Atom)