Monday, 14 August 2017

How to close or kill a session?



Using "CLOSE_SESSION" Or "INTERUPT_STATEMENT" commands, we can close/kill current running sessions.

Detailed Description:
If we need to close a session, follow the below steps

Step1: Identify the session
  • Find the Session Id which we need to close. Connect to Vertica DB Using super user and run the below query, it gives the list of current running sessions along with Session_Id.
          SELECT * FROM  SESSIONS

Step2: Close the session
  •  Using "Close_Session" or "Interupt_Statement" commands we can colse/kill the current running sessions.

Syntax:
          SELECT CLOSE_SESSION('<Session ID>')
          OR
          SELECT INTERUPT_STATEMENT('<Session ID>')

How to find currently running sessions?



Vertica is having a table 'Sessions' to maintain currently running sessions information. Using Sessions table we can find the current running sessions information.

Query: Connect to DB as Admin and run the below statement

SELECT * FROM SESSIONS

Sunday, 20 December 2015

What is Encoding and Compression in Vertica?



Data Encoding and Compression:
        HP Vertica uses both encoding and compression to optimize query performance and save storage space. However, in your HP Vertica database, they have different meanings.

Encoding:
        Encoding is the process of converting data into a standard format. In HP Vertica, encoded data can be processed directly, but compressed data cannot. HP Vertica uses a number of different encoding strategies, depending on column data type, table cardinality, and sort order. Encoding increases performance because there is less disk I/O during query execution. In addition, you can store more data in less space. Encoding is not the same as compression.

Compression:
         Compression is the process of transforming data into a compact format. Compressed data cannot be directly processed; it must first be decompressed. HP Vertica uses integer packing for unencoded integers and LZO for compressible data. Although compression is generally considered to be a form of encoding, the terms have different meanings in HP Vertica.


For More Info: Click Hiere

Saturday, 19 December 2015

What is Mergeout in Vertica?



    A mergeout is the process of consolidating ROS containers and purging deleted records. Over time, the number of ROS containers increases to a degree that it becomes necessary to merge some of them in order to avoid performance degradation. At that point, the Tuple Mover performs an automatic mergeout, which combines two or more ROS containers into a single container. This process can be thought of as "defragmenting" the ROS.


For More Info: Click Here

What is ROS in Vertica?



     Read Optimized Store (ROS) is a highly optimized, read-oriented, disk storage structure. The ROS makes heavy use of compression and indexing. You can use the COPY...DIRECT and INSERT (with /*+DIRECT*/ hints) statements to load data directly into the ROS.

What is WOS in Vertica?



    Write Optimized Store (WOS) is a memory-resident data structure for storing INSERT, UPDATE, DELETE, and COPY (without /*+DIRECT*/ hints) actions. To support very fast data load speeds, the WOS stores records without data compression or indexing. The WOS organizes data by epoch and holds both committed and uncommitted transaction data

What is Tuple Mover (TM) in Vertica?



    The Tuple Mover (TM) is the database optimizer component of Vertica that moves data from memory (WOS) to disk (ROS), combines small ROS containers into larger ones, and purges deleted data. The Tuple Mover runs in the background. Under ordinary circumstances, the operations performed by the Tuple Mover (TM) are automatic and transparent, and are therefore of little or no concern to the database administrator.


For More info: Click Here