Common Actions in the Query Panel
We've highlighted the most common functions heavily used in the editor to help you navigate SQL faster. You can open a complete list of all available functions by hitting the ⌘+Shift+P (Mac) or Ctrl+Shift+P (Windows) combination within the editor or from the View->Command Palette menu.
Explain Plan functionality provides answers regarding your queries performance and the information you need to optimize it. There is a design advisor that recommends structural changes required for performance improvements of one or more queries. Explain also lets you estimate the cost for a specific query (based on the current RUNSTATS statistics).This feature helps you determine parameters such as:
- data access paths for the SELECT parts of your statements that DB2 uses
- how many indexes and index columns are there
- the join method and type for the joins of tables
- whether parallel processing was used
- if any sorts were performed and reasons for it
- what I/O methods are used to read the pages
- and more.
To enable this feature, navigate to the execution mode dropdown and select the Explain Plan option as shown below.
Find and Replace
This feature allows you to find the needed statement quickly and easily. To see the Find and Replace menu, press Ctrl+F (Windows) or ⌘+F (Mac), as shown below. Additionally, you can place the cursor anywhere within your query, and Aginity will automatically fill the Find field with that statement.
🔎 Note: For your convenience, you can easily change the shortcuts via the Keybindings menu. To use it, press F1 or go to the main menu panel, click on the Aginity Pro/Premium tab, and select Keybindings as shown below.
Our application lets you use typical SQL syntax to leave comments in your code. Check the example
1 -- This is one way to comment your SQL code
3 SELECT AVG(LineTotal)
4 FROM sales.SalesOrderDetail
6 /* This is another way to comment on your SQL code */
To comment on multiple lines of code, highlight them and press Ctrl+K+C (Windows) or ⌘+K+C (Mac). To uncomment, use Ctrl+K+U or ⌘+K+U.
🔎 Note: For your convenience, you can easily change these shortcuts via the Keybindings menu. To use it, press F1 or go to the main menu panel, click on the Coginiti Pro/Premium tab, and select Keybindings.
Save Query to Catalog
This Coginiti's feature that allows you to save an edited query to any of your catalogs. Check our Using Coginiti Catalog guide for detailed information on this topic.
Executing to a File
Use our editor commands to spool the results of your SQL statements to .csv files. See more details by link
Working with Tabs
In Coginiti, you can rename, duplicate, close and save tabs, or create the new ones and restore closed tabs.
- Save As File
You can save any tab with an edited query as a file. To do so, just hit Ctrl+Shift+S (Windows) or ⌘+Shift+S (Mac) or right-click on a tab and select 'Save as File,' and then type in the needed name.
🔎 Note: For your convenience, you can easily change the shortcuts via the Keybindings menu. To use it, press F1 or go to the main menu panel, click on the Coginiti Pro/Premium tab, and select Keybindings as shown below.
If you need to rename your query tab, double-click on it and specify a new name. Or right-click on a tab and select 'Save as File.'
The Keep Connection checkbox will instruct Coginiti to maintain the connection to your database if its default behavior is set to disconnect after the query execution. However, you are still subject to an overall database connection timeout if your session connection exceeds the permitted settings.