+ All Categories
Home > Documents > Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide...

Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide...

Date post: 07-Oct-2020
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
42
Vertica Community Edition Virtual Machine User Guide Vertica Analytic Database Software Version: 10.1.x Document Release Date: 1/28/2021
Transcript
Page 1: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Vertica Community EditionVirtual Machine User GuideVertica Analytic DatabaseSoftware Version: 10.1.x

Document Release Date: 1/28/2021

Page 2: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Legal Notices

Warranty

The only warranties for Micro Focus or one of its affiliates products and services are set forth in the expresswarranty statements accompanying such products and services. Nothing herein should be construed asconstituting an additional warranty. Micro Focus shall not be liable for technical or editorial errors oromissions contained herein.

The information contained herein is subject to change without notice.

Restricted Rights Legend

Confidential computer software. Valid license from Micro Focus required for possession, use or copying.Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation,and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standardcommercial license.

Copyright Notice

© Copyright 2007 - 2021 Micro Focus or one of its affiliates

Trademark Notices

Adobe™ is a trademark of Adobe Systems Incorporated.

Apache® Hadoop® and Hadoop are either registered trademarks or trademarks of the Apache SoftwareFoundation in the United States and/or other countries.

Microsoft® and Windows® are U.S. registered trademarks of Microsoft Corporation.

UNIX® is a registered trademark of The Open Group.

This product includes an interface of the 'zlib' general purpose compression library, which is Copyright ©1995-2002 Jean-loup Gailly and Mark Adler.

Vertica Community Edition Virtual Machine User Guide

Micro Focus Vertica Analytic Database (10.1.x) Page 2 of 42

Page 3: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

ContentsLegal Notices 2

Warranty 2

Restricted Rights Legend 2

Copyright Notice 2

Trademark Notices 2

About This Document 5

Get Started with the Vertica Community Edition VM 6

Download the Vertica CE VM and the Vertica Documentation 6

Startup and Log In to the Vertica CE VM 7

What's in the VM? 8

Install the Vertica Documentation on VMware 8

Install the Vertica Documentation on VirtualBox 9

Browse the Vertica Documentation 9

The Vertica Client Tools 10

Get Started With Management Console 11

Log In to Management Console 11

The Exploring New Features Dialog Box 13

View the Management Console Home Page 14

View High-Level Details About the Database and Cluster 15

View VMart Status 16

Why Is Vmart Yellow? 17

Is VMart in Compliance? 18

Configure the Database and MC 19

Query Execution 20

Vertica Analytic Database (10.1.x) Page 3 of 42

Page 4: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Explain Plans and Query Profiles 25

Explore the Overview Tab 27

Learn More About Management Console 28

Get Started with Administration Tools 29

admintools GUI: Check the Database 30

admintools GUI: Execute vsql Commands 31

admintools Command Line: Check the Database 31

admintools Command Line: Access Help 33

Learn More About Administration Tools 34

Get Started with vsql 35

Start vsql 35

Display a List of vsql Commands 36

Execute vsql Commands 37

Load Online Sales Data 39

Exit vsql 40

Learn More About vsql 41

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 4 of 42

Page 5: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

About This DocumentThe goal of this document is to introduce you to Vertica by guiding you through a set ofcommon tasks. As you follow along, you will learn how to use the Vertica ManagementConsole, Administration Tools, and vsql.

Documentation references with each example will help you learn how to find theinformation you need when you need it.

Important:To benefit from the documentation references in this document, you mustdownload and install the Vertica documentation. Follow the instructions inGet Started with the Vertica Community Edition VM.

If you read this document on the Vertica website, the documentation linkswill not work.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 5 of 42

Page 6: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Get Started with the VerticaCommunity Edition VMThe Vertica Community Edition Virtual Machine (Vertica CE VM) is a preconfigured Linuxenvironment that offers a hands-on introduction to the Vertica Analytic Database. After youcomplete the steps described in the following topics, the environment runs locally on yourcomputer and does not require internet access.

Download the Vertica CE VM and the Vertica DocumentationIf you have not already downloaded the Vertica CE VM and the Vertica documentation,follow these steps:

1. Navigate to Vertica Downloads - Community Edition.2. Log in or create an account.3. Under Vertica Community Virtual Machine, click the Download link for your

virtualization platform.

Note:The Vertica CE VM is available in two virtualization formats: one forVMware, the other for Oracle VM VirtualBox.

4. Accept the license agreement.5. Save the file on your computer.6. Download the Vertica documentation (optional):

Important:The documentation ZIP file contains the entire Verticadocumentation set. The documentation links in this user guide onlywork when the Vertica documentation is installed locally in the VM.

l VMware: Download the documentation ZIP file:A. Navigate to Vertica Documentation.B. Click Complete Documentation: Zipped HTML.C. Click Save to save the ZIP file on your computer.

Vertica-user-doc_10.1.x-for-download.zip

The instructions in Install the Vertica Documentation on VMware explain how tocopy/paste or drag the documentation ZIP file into the VM.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 6 of 42

Page 7: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

l VirtualBox: You will download the documentation later as explained in Install theVertica Documentation on VirtualBox.

Startup and Log In to the Vertica CE VM1. Locate the VM file that you downloaded.

The file for VMware has a ZIP extension. The file for VirtualBox has an OVA extensionor a TAR extension, depending on the browser you used for the download.

l VMWare: Unzip the file.l VirtualBox: If the file has a TAR extension, change it to OVA.

2. Open the file in your VM player.l VMWare: Open the VMX file.

Note:On initial startup only, VMware displays this message. Click Icopied it to dismiss the message.

l VirtualBox: Import the OVA file.3. Start up the VM.

Note:Startup may take some time.

4. Log in to the VM with these credentials:.User: Vertica DBA

Password: password

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 7 of 42

Page 8: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

What's in the VM?When you launch the VM, you will find these components up and running and ready for use:

l Vertica Analytic Database Community Editionl Vertica Management Consolel Vertica VMart example database

Note:VMart is fully loaded except for the online_sales fact table andits two unique dimensions. Instructions for loading the missing dataare provided as an exercise in the topic Get Started with vsql.

Install the Vertica Documentation on VMware1. On the VM desktop, double click home, then double click Vertica_Docs to navigate to

/home/Vertica_Docs/.

Important:You must be logged in as dbadmin.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 8 of 42

Page 9: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

2. Navigate to the location where you downloaded the Vertica documentation ZIP file onyour computer. The name of the ZIP file is:Vertica-user-doc_10.1.x-for-download.zip

3. To copy the Vertica documentation ZIP file to /home/Vertica_Docs/ in the VM,drag it or copy and paste it.

4. Open a terminal window in the VM.5. Execute the following commands:

$ cd /home/dbadmin/Vertica_Docs/

$ unzip Vertica-user-doc_10.1.x-for-download.zip -d /home/dbadmin/Vertica_Docs/

Install the Vertica Documentation on VirtualBox1. In the VM, open this link: https://www.vertica.com/documentation/vertica/10-1-x-

documentation/.

Important:You must be logged in as dbadmin.

2. Click Complete Documentation: Zipped HTML.3. Click Save to save the ZIP file to the Downloads folder in the VM.

Vertica-user-doc_10.1.x-for-download.zip

4. Move the ZIP file to this folder:

/home/dbadmin/Vertica_Docs/

5. Right-click the ZIP file and select Extract here.

Browse the Vertica DocumentationAfter downloading and unzipping the documentation:

l Take a look at the Vertica documentation home page.l Refer to Introducing the VMart Example Database to learn about the VMart example

data used in the exercises.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 9 of 42

Page 10: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

The Vertica Client ToolsVertica has a set of client tools for managing your Vertica environment and for queryingand managing your data. The interfaces support a full range of tasks, from scripting togenerating informative performance charts.

Management Console(MC)

Administration Tools(admintools) vsql

Launch from... Browser Terminal Terminal

Manage clusters anddatabases

YES YES YES

Visualize operationsand performance

YES NO NO

Allow scripting NO YES YES

Run SQL Query Execution tab Connect to Databasemenu item

vsqlcommand

Get started Get Started WithManagement Console

Get Started withAdministration Tools

Get Startedwith vsql

Tip:See Administration Tools and Management Console in the Verticadocumentation for a detailed comparison of the functionality inManagement Console and Administration Tools.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 10 of 42

Page 11: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Get Started With ManagementConsoleVertica Management Console (MC) is a user-friendly performance monitoring andmanagement tool that provides a unified view of your Vertica database operations. Using abrowser, you can create, import, manage, and monitor one or more databases and theirassociated clusters. You can also create and manage MC users and map them to Verticausers.

Log In to Management Console1. Double click the Management Console icon on the VM desktop.

Vertica Management Console opens in a browser at URL addresshttps://127.0.0.1:5450/webui

2. Click the Login button to log in with the credentials supplied in the dialog box:Username: uidbadmin

Password: Vertica@123

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 11 of 42

Page 12: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

3. Set up your security questions and change your password.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 12 of 42

Page 13: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

The Exploring New Features Dialog BoxAfter you log in, the Management Console home page displays a dialog box entitledExploring New Features in Vertica. The dialog box provides links to topics in the Verticadocumentation that describe new or changed features in this release.

The links in the dialog box are URLs to the Vertica documentation on the Vertica website. Ifyou have a network connection and the VM recognizes it, you can click the links to view thedocumentation. However, we recommend that you skip this exploration step until you havecompleted the exercises in this document. If you have loaded the Vertica documentationinto the VM, you can find these same topics locally in the VM.

To close the dialog box, simply click OK. On subsequent logins, you can suppress the dialogbox by clicking Do not display this message again.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 13 of 42

Page 14: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

View the Management Console Home PageThe first screen you see when you log in to Management Console is a portal that providessingle-click access to the main functional areas of the tool.

Under Recent Databases, we see the VMart example database, which was created andimported into MC as part of VM creation.

NEXT STEP: Under Manage, click View Your Infrastructure to open the Infrastructurepage.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 14 of 42

Page 15: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

View High-Level Details About the Database and ClusterThe Database and Cluster View tab provides a high-level view of the databases and clustersthat you can examine and administer within MC. On this page, you can start and stopdatabases and remove databases from MC. When you remove a database, it still exists butis no longer accessible within MC.

ACTION: Click the VMart database to display information about it.

NEXT STEP: Click View to open the Overview page for VMart.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 15 of 42

Page 16: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

View VMart StatusThe Overview page is a dashboard that displays key indicators about the database,including node status, memory, CPU activity, disk space usage, and query activity.

ACTIONS:

l Click the speedometer icon to display the System Health dashboard.l Click the bar chart icon to display the Query Synopsis dashboard.

NEXT STEP: Click the Manage tab at the bottom of the page.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 16 of 42

Page 17: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Why Is Vmart Yellow?The Manage tab displays a graphical representation of each database node with its IPaddress, node name, status, hardware detail, and health rating.

If you select Memory Utilization from the KPI View drop-down list, VMart displays asyellow, indicating that its status is CRITICAL. Even before making a selection, VMart maydisplay as yellow. Why? The Vertica CE VM hosts a single node cluster, but a minimum ofthree nodes is required for high availability. MC considers the status of VMart to be critical,because if the node goes down then the database will be down.

To learn about high availability in Vertica, read the topic on K-Safety in the Verticadocumentation.

ACTIONS:

For each of the items on the KPI View drop-down list:

1. Select the item.2. Watch the visuals and values change.

NEXT STEP: Click the License tab to view the status of the license for VMart.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 17 of 42

Page 18: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Is VMart in Compliance?The License tab displays information about database licensing and compliance. On this tab,you can monitor license usage over time and be prepared if expiration is pending or ifyou're approaching the maximum allowable data size.

ACTION: Click the Audit button.

Questions:

l When does the Vertica Community Edition license expire?l What is the maximum allowable data size for this license?

NEXT STEP: Click the Settings tab.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 18 of 42

Page 19: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Configure the Database and MCOn the Settings tab, you can set database options and configure several response thresholdsin MC. For example, you can set the Tuple Mover interval in the database, and you canconfigure MC to raise an alert when memory usage on the node reaches a certainpercentage.

ACTIONS: Click each option on the side menu and note the controls and settings for eachone.

NEXT STEP: Click the Query Execution tab.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 19 of 42

Page 20: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Query ExecutionAfter you click the Query Execution tab, the SQL window opens. In this window, you can runSQL statements in the Vertica database. Key components of the SQL window include:

l Query History—A recall window, where MC saves SQL statements after they areexecuted. You can recall and rerun any of the SQL stored in the recall window.

l Edit window—A window where you can specify SQL statements. You can type SQL,paste it from the recall window, or import it from a file.

l Execute Query bar—Click this bar to execute the query in the edit window.l Results window—A window where the results of SQL execution are posted. In this

pane, there are also actions you can perform based on SQL results. For example: youcan export the results to a csv file.

ACTIONS:

To execute a query from Query History:

1. Click the query labeled query2 to display it in the edit window.2. Click the Format SQL icon and watch the results.3. Click the Execute Query bar. Observe the results in the results window.4. Click Auto-Resize all columns to set column widths to the longest value in the

column.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 20 of 42

Page 21: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

5. Click Export Data to export the query results to a csv file, pipe it directly intoLibreOffice Calc, or save it to a file.

To execute a query by typing it in the edit window:

1. Clear the edit window and results window by clicking the Clear button (eraser icon).2. In the edit window, type:

select version()

3. Click the Execute Query bar.The version of the Vertica server displays in the results window.

You can type multiple SQL commands in the edit window. Terminate each commandwith a semicolon. MC parses the commands and executes them individually. Eachcommand has its own result set tab in the results window.

To execute a query from a file:

1. Click the eraser icon to clear the edit window and results window.2. Click the Import SQL Script icon.3. Select the example_vmart_query_02.sql file and click Open. If the file is not

visible, navigate to /opt/vertica/examples/VMart_Schema.

The file is loaded into the edit window.

4. Click the Execute Query bar to run the SQL and generate the result set in the resultswindow.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 21 of 42

Page 22: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

NEXT STEPS:

1. Click the Query Profile tab in the results window to display th profile associated withthe query you just ran.The query profile does not display, because profiles are not generated automaticallyfor queries that run in less that one second.

2. To generate the profile, prepend the word PROFILE to the query.3. Click Execute Query, then select the Query Profile tab.

Some of the profile data displays in the Query Profile tab.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 22 of 42

Page 23: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

4. To see more of the query profile data, click View more profile information.

The Query Plan page displays.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 23 of 42

Page 24: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Note:If you click the Explain or Profile button on the Query Plan page,Management Console refreshes the text of the query, including thekeyword PROFILE. This behavior causes an error, as shown:

To work around this error, simply delete the PROFILE keyword fromthe text of the query and click the Explain or Profile button a second time.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 24 of 42

Page 25: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Explain Plans and Query ProfilesExplain plans and query profiles are useful for performance analysis. You can generateexplain plans and query profiles on the Query Plans tab of MC. Follow these steps to profilethe query you executed in the previous section, take corrective action, and then verify theresults.

1. After you profile the query and review the path information, note that NO STATISTICSappears in red. Note also the Cost and Rows detail, which is generated by the VerticaOptimizer. Cost is the estimated cost of the query. Rows is the number of rows to bereturned for that specific step of the query execution.

+-JOIN HASH [Semi] [Cost: 1K, Rows: 75K (NO STATISTICS)] (PATH ID: 1)

+-- Outer -> JOIN HASH [Anti][NotInAnti] [Cost: 732, Rows: 150K (NO STATISTICS)] (PATHID: 2)

+-- Outer -> STORAGE ACCESS for orders [Cost: 546, Rows: 300K (NO STATISTICS)] (PATH ID:3)

+---> STORAGE ACCESS for vendor_dimension [Cost: 10, Rows: 25 (NO STATISTICS)] (PATH ID:5)

+---> STORAGE ACCESS for store_dimension [Cost: 10, Rows: 125 (NO STATISTICS)] (PATH ID:7)

Without statistics, the optimizer may not plan an efficient execution of the query.

2. Apply statistics as follows:

1. Return to the Query Execution tab.2. In the edit window, type the following SQL statement:

select analyze_statistics('')

(The tick marks in parentheses are single quotation marks.)

3. Click the Execute Query bar.After a few seconds, the statement returns 0 for success.

3. Clear the screen, then recall the query labeled query2 and execute it.

4. Click Query Profile, then click View More Profile Information.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 25 of 42

Page 26: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

5. Click the Profile button.

Note:The cost values have increased slightly, but the number of rowsreturned has decreased significantly. This means that the optimizer isdoing a more efficient job of returning only rows meeting the filtercriteria, which should equate to faster times and less memory usage.

NO STATISTICS:

+-JOIN HASH [Semi] [Cost: 1K, Rows: 75K (NO STATISTICS)] (PATH ID: 1)

+-- Outer -> JOIN HASH [Anti][NotInAnti] [Cost: 732, Rows: 150K (NO STATISTICS)] (PATHID: 2)

+-- Outer -> STORAGE ACCESS for orders [Cost: 546, Rows: 300K (NO STATISTICS)] (PATH ID:3)

+---> STORAGE ACCESS for vendor_dimension [Cost: 10, Rows: 25 (NO STATISTICS)] (PATH ID:5)

+---> STORAGE ACCESS for store_dimension [Cost: 10, Rows: 125 (NO STATISTICS)] (PATH ID:7)

WITH STATISTICS

+-JOIN HASH [Semi] [Cost: 2K, Rows: 18K] (PATH ID: 1)

+-- Outer -> JOIN HASH [Anti][NotInAnti] [Cost: 1K, Rows: 35K] (PATH ID: 2)

+-- Outer -> STORAGE ACCESS for orders [Cost: 1K, Rows: 71K] (PATH ID: 3)

+---> STORAGE ACCESS for vendor_dimension [Cost: 35, Rows: 3] (PATH ID: 5)

+---> STORAGE ACCESS for store_dimension [Cost: 35, Rows: 16] (PATH ID: 7)

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 26 of 42

Page 27: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Explore the Overview TabNow that we've seen some of the capabilities of MC, let's take a look at the Overview tab.In this tab, you can see summarized information about the database. Some of the items onthis tab are actually links; you can click them to display additional details. You can learnmore about other items by hovering your mouse over them.

ACTIONS:

1. At the bottom of the page, click the Overview tab. If the Status Summary page is notdisplayed, click the monitor icon on the upper left.

2. In the CPU/Memory/Disk I/O section, hover over the Avg Mem Usage (%) line in theline graph.

3. Observe the additional details for this point in time.4. Click a point in the timeline to open an exploded view of this time.5. Click the Back arrow in your browser to return to the Status Summary page.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 27 of 42

Page 28: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Learn More About Management ConsoleTo learn more about the Vertica Management Console, see these topics in the Verticadocumentation:

l Management Consolel Using Management Console

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 28 of 42

Page 29: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Get Started with AdministrationToolsThe Administration Tools interface allows you to manage your Vertica environment from aLinux shell.

You can use Administration Tools within an interactive graphical user interface, or you canuse the command line. The command line is useful for scripting.

Tip:The vsql commands in these examples are stored in the command historybuffer in the VM. Instead of typing a command, you can press the Up arrowand select it from the list.

Start the Administration Tools GUI

1. Right-click the desktop and select Open Terminal.2. At the Linux command line, type admintools.

The Main Menu displays.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 29 of 42

Page 30: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

admintools GUI: Check the Database1. To see if the database is up, select option 1 View Database Cluster State and click

OK.

The database status displays. We see that the VMart database is up and that all hostcomputers are running.

2. To return to the Main Menu, click OK.3. To view details about the database, select option 6 Configuration Menu and click OK.4. On the Configuration Menu, select option 3 View Database and click OK.

5. On the Select database to view screen, press the space bar to select VMart and clickOK.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 30 of 42

Page 31: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Details about the VMart database display.

6. Click OK.7. Scroll to option M Main Menu, then click OK.

admintools GUI: Execute vsql Commands1. To run sql statements against the database using the vsql command line, select option

2 Connect to Database and click OK.2. Type the password for connecting to the VMart database and click OK.

The password is password.

The vsql prompt displays.

3. To display the version of vsql, type select version();as shown:

dbadmin=> select version();

4. To exit vsql and return to the Administration Tools GUI, type \q.5. To exit the Administration Tools GUI, select option E Exit and click OK.

admintools Command Line: Check the DatabaseTo check database status and details using the Administration Tools command line:

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 31 of 42

Page 32: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

1. Right-click the desktop and select Open Terminal.2. To check if the database is up, type the following command at the Linux command

prompt:

[dbadmin@localhost ~]$ admintools -t db_status -s UP

This command returns the following, indicating that the VMart database is running:

VMart

3. To view details about the database, type this command:

[dbadmin@localhost ~]$ admintools -t list_db -d VMart

This command returns the following:

Database: VMart

Database Log: /vertica/data/VMart/dbLog, /vertica/data/VMart/v_vmart_node0001_catalog/vertica.log

Hosts: 127.0.0.1

Restart Policy: always

Port: 5433

Catalog Directory: /vertica/data/VMart/v_vmart_node0001_catalog

[dbadmin@localhost ~]$

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 32 of 42

Page 33: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

admintools Command Line: Access Help1.  To access admintools Help, type this command:

[dbadmin@localhost ~]$ admintools --help

This command returns the following:

Usage: admintools [options]

Options:

-h, --help Display this help. Can be combined with -t <tool> for

help on a specific tool

-a, --help_all List all command line sub-commands and switches

--debug Set adminTool logging in debug mode

-t, --tool name_of_tool

Invoke an available tool. Example: admintools -t connect_db -d VMart

Available tools:

command_host

connect_db

create_db

.

.

.

2. To get help on a specific tool, type a command like the one shown here for the list_node tool:

[dbadmin@localhost ~]$ admintools -t list_node -help

This command returns the following:

Usage: admintools [options]

Usage: list_node [options]

Options:

-h, --help show this help message and exit

-n NODENAME, --node=NODENAME

Name of the node to be listed

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 33 of 42

Page 34: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Learn More About Administration ToolsTo learn more about the Vertica Administration Tools, see these topics in the Verticadocumentation:

l Administration Toolsl Using the Administration Tools

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 34 of 42

Page 35: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Get Started with vsqlvsql is a character-based, interactive utility that lets you type SQL statements and see theresults. vsql also provides meta-commands and several shell-like features for writing scriptsand automating various tasks.

Tip:The vsql commands in these examples are stored in the command historybuffer in the VM. Instead of typing a command, you can press the Up arrowand select it from the list.

Start vsql1. Right-click the desktop and select Open Terminal.2. Change to the directory that contains the VMart example scripts used in this exercise:

[dbadmin@localhost ~]$ cd /opt/vertica/examples/VMart_Schema

3. Start vsql and type password for the password:

[dbadmin@localhost VMart_Schema]$ vsql

Password:

The following text displays:

Welcome to vsql, the Vertica Analytic Database interactive terminal.

Type:

\h or \? for help with vsql commands

\g or terminate with semicolon to execute query

\q to quit

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 35 of 42

Page 36: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Display a List of vsql Commands1. To display a list of vsql commands, type \? as shown:

dbadmin=> \?

The following output displays:

See the Vertica Programmer's Guide for information on available commands.

General

\c[onnect] [DBNAME|- [USER]]

connect to new database (currently "dbadmin")

\cd [DIR] change the current working directory

\q quit vsql

\set [NAME [VALUE]]

set internal variable, or list all if no parameters

\timing [on|off]

toggle timing of commands, or explicitly turn it on or off (currently

off)

.

.

.

2. To view more output, press the space bar.3. To quit displaying output, type q.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 36 of 42

Page 37: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Execute vsql Commands1. Type \d to see a list of user tables:

dbadmin=> \d

The list of tables displays:

List of tablesSchema | Name | Kind | Owner | Comment-------------+----------------- -----+-------+---------+--------online_sales | call_center_dimension | table | dbadmin |online_sales | online_page_dimension | table | dbadmin |online_sales | online_sales_fact | table | dbadmin |public | customer_dimension | table | dbadmin |public | date_dimension | table | dbadmin |public | employee_dimension | table | dbadmin |public | inventory_fact | table | dbadmin |public | product_dimension | table | dbadmin |public | promotion_dimension | table | dbadmin |public | shipping_dimension | table | dbadmin |public | vendor_dimension | table | dbadmin |public | warehouse_dimension | table | dbadmin |store | store_dimension | table | dbadmin |store | store_orders_fact | table | dbadmin |store | store_sales_fact | table | dbadmin |(15 rows)

Note:\d is an example of a meta-command in vsql. Meta-commands beginwith an unquoted backslash character and are processed by vsqlitself. These commands help make vsql more useful foradministration or scripting.

See Meta-Commands in the Vertica documentation for details.

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 37 of 42

Page 38: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

2. Type \ds to see a list of system tables:

dbadmin=> \dS

The list of system tables displays:

List of tablesSchema | Name | Kind | Description|Comment----------+----------------- +-------+---------------------------------------------------+-----------v_catalog |access_policy |system |Access Policy information|v_catalog |all_tables |system |A complete listing of all tables and views|v_catalog |client_auth |system |Client Authentication Detailed information|v_catalog |client_auth_params|system |Client Authentication Paramters|v_catalog |cluster_layout |system |Current cluster layout with relative order ofnodes|v_catalog |columns |system |Table column information|v_catalog |comments |system |User comments on catalog objects|v_catalog |constraint_columns|system |Table column constraint information|v_catalog |databases |system |Database information|v_catalog |directed_queries |system |Directed queries|...

To view more output, press the space bar. To quit displaying output, type q.

3. Query the system table projection_storage as shown:

dbadmin=> select projection_name,sum(row_count) from projection_storage where projection_schema = 'online_sales' group by projection_schema, projection_name order by sum(row_count);

The query returns the following:

projection_name | sum---------------------+-----(0 rows)

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 38 of 42

Page 39: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Load Online Sales DataFollow these steps to load data into the online-sales fact table and its two unique

dimensions:

1. View the content of the external SQL script called vmart_load_online_sales_data.sql.Press the Up arrow repeatedly until you find the following command. Select it toexecute the command from History.

dbadmin=> \! cat /opt/vertica/examples/VMart_Schema/vmart_load_online_sales_data.sql

The content of the SQL script file displays:

\set t_pwd '/opt/vertica/examples/VMart_Schema'

\set input_file '''':t_pwd'/Online_Page_Dimension.tbl'''COPY online_sales.Online_Page_Dimension FROM :input_file DELIMITER '|' NULL '' DIRECT;

\set input_file '''':t_pwd'/Call_Center_Dimension.tbl'''COPY online_sales.Call_Center_Dimension FROM :input_file DELIMITER '|' NULL '' DIRECT;

\set input_file '''':t_pwd'/Online_Sales_Fact.tbl'''COPY online_sales.Online_Sales_Fact FROM :input_file DELIMITER '|' NULL '' DIRECT;

2. Run the external SQL script to load the data:

dbadmin=> \i /opt/vertica/examples/VMart_Schema/vmart_load_online_sales_data.sql

The script loads the data and displays the following:

Rows Loaded-------------1000(1 row)

Rows Loaded-------------200(1 row)

Rows Loaded-------------5000000(1 row)

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 39 of 42

Page 40: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

3. Rerun the query of the system table projection_storage to see the effect of the dataload:Press the Up arrow repeatedly until you find the following command. Select it toexecute the command from History.

dbadmin=> select projection_name,sum(row_count) from projection_storage where projection_schema = 'online_sales' group by projection_schema,projection_name order by sum(row_count);

The query returns the following:

projection_name | sum-----------------------------+---------call_center_dimension_super | 200online_page_dimension_super | 1000online_sales_fact_super | 5000000(3 rows)

Exit vsqlTo exit vsql, type \q:

dbadmin-> \q

After you exit vsql, the Linux command prompt displays:

[dbadmin@localhost VMart_Schema]$

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 40 of 42

Page 41: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Learn More About vsqlTo learn more about vsql, see the following topics in the Vertica documentation:

l Using vsqll SQL in Vertica

Vertica Community Edition Virtual Machine User Guide

Vertica Analytic Database (10.1.x) Page 41 of 42

Page 42: Vertica Community Edition VM User GuideAug 31, 2020  · Vertica Community Edition VM User Guide Author: Micro Focus | Vertica Created Date: 8/31/2020 12:14:01 PM ...

Page 42 of 42Vertica Analytic Database (10.1.x)

Vertica Community Edition Virtual Machine User Guide


Recommended