Queries
Deployment options: Netezza Performance Server for Cloud Pak for Data
You can access queries information by using the web console.
Recent queries
The administrator privileges are not necessary to view recent queries. The Recent Queries
view is only showing SQL statements that involve the generation of a query plan, for example,
INSERT, UPDATE, DELETE, or SELECT statements.
- Filter - "Submitted within last:"
- Success Ratio: Represents the ratio of queries executed within the selected time span. This metric calculates the total number of queries fired against the number of completed and failed queries (with varying failure reasons).
- Databases: Displays the total number of queries fired on the databases during the selected time span.
- Users:
- For Admin users: Displays the total number of queries fired by all users within the selected time span.
- For Non-admin users: Shows the total number of queries fired by the individual user within the selected time span.
Note: The number of queries displayed is limited to a maximum of 2,000.
Creating queries
- Go to Query editor.
- Type a name for your query.
- Select the database in which you want to run the query.
- Select the schema where you want to run the query. If you do not pick a schema, the default database schema is selected.
- Type the SQL query that you want to run. If your query is a select statement, a Set Limit option appears to allow you to specify how many rows of data you want to retrieve. The default is No limit.
- When you add the necessary information, you can do one of the following:
- Click Run to run the query. The results of the query are displayed in the panel.
- Click the floppy disk icon that is next to the
Query fieldname to save the query as a template. The saved query is added to Queries > Recent Queries. -
Click Clear to clear the query.
Finding queries
- Go to Query editor.
- Type the name of the query you are looking for in the search bar.
Query history
Note: To view all queries under Query history, Query history should be enabled.
To access the page, go to Queries > Query history or select Query history from the home page.
When you are on the Query history page, you can do the following:
- View your data in a table or card view.
- Export data to export your query history to a data file.
- Sort any column by placing the cursor on the column header.
- Find specific queries by using various filtering criteria.
- Search the query history but clicking Search. You can use a predefined search criteria, or create a new search option.
- Select the columns to display in the table. Click the settings icon next to the Find query history field to edit columns.
- View metrics and statistics status.
Query history columns
- Start time Specifies the time when the query started.
- End time Specifies the time when the query finished.
- Elapsed time Specifies the time that it took the query to run.
- Query text Specifies the SQL command of the query.
- Database Specifies the name of the database on which the query ran.
- Schema Specifies the schema that was used for the query.
- User name Species the name of the user that ran the query.
- Group Specifies the group of users from which the query originates.
- Result rows Specifies the number of result rows that were returned by the query.
- Prep time Specifies the preparation time that was needed for the query.
- Status Specifies the completion status of the query.
- Plan ID Specifies the ID of the system-generated plan for the query.
- Client IP Specifies the IP of the client that ran the SQL query.
- GRA time Specifies the time that the query spent at the GRA.
- Checksum Specifies the checksum of the query.
- Client type Specifies the type of the client that ran the query.
- Client host Specifies the hostname of the client from which the query originates.
- Resource group name Specifies the resource group on which the query ran.
Query cancellation
When you execute a long running query from query editor, you can cancel the query until the time it is in execution by a simple click of the button. The cancellation now work for short queries.