2.5

Table Of Contents
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 126.
Procedure
1 Click the Manage and Monitor tab.
2 Right-click a database and select Open vPostgres Console.
3 Expand Schemas in the left pane.
4 Select a schema and click Enter SQL.
5 Enter a SQL query in the entry pane, or click Open to open a SQL script file.
6 Click Execute to run the query.
7 Click Explain to view the query plan, runtime, and CPU cost.
What to do next
Adjust the SQL query, rerun, and reexamine the query plan to tune performance.
Chapter 11 Managing Database Entities
VMware, Inc. 127