2.7

Table Of Contents
2 Click the gear icon, and select Create > Constraint.
3 Select Check Constraint.
1 Type a name for the constraint, such as check_positive_price.
2 Enter the constraint in the Check text box.
3 (Optional) Enter a comment that describes the constraint.
4 Click OK.
Data Director creates the constraint.
SQL Management
Managing SQL includes developing and testing SQL queries and monitoring and tuning query performance.
You must have appropriate permissions on the schema and database to develop and manage SQL queries. You
can manage SQL from the schema page.
Enter and Run a SQL Query
Create and modify SQL queries.
Prerequisites
You are logged in to Data Director as a user with appropriate privileges on the database or schema.
Procedure
1 Click the Manage and Monitor tab.
2 Right-click a database and select Open vPostgres Console.
3 Click Enter SQL.
4 Enter a query in the Entry pane.
You can type or modify a SQL query, test the query, and analyze the query's execution plan before running
it.
n
Type the query in the entry pane.
n
Click Open to open a SQL script file.
5 Click Execute to run the query.
If the query runs successfully, data appears in the Output pane.
View a Query Plan
Viewing a SQL query execution plan lets you analyze query run time and cost to ensure that your queries run
as efficiently as possible.
Prerequisites
n
You are logged in to Data Director as a user with appropriate privileges on the database or schema.
n
You know how to enter and run a SQL query. See “Enter and Run a SQL Query,” on page 146.
Procedure
1 Click the Manage and Monitor tab.
2 Right-click a database and select Open vPostgres Console.
VMware vFabric Data Director Administrator and User Guide
146 VMware, Inc.