Background Image

DOCUMENTATION

?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print Attachment

 

Author: Junghoon Kim

 

The SQLGate for CUBRID was released on July 30,2019. You can find more release details about it on the SQLGate website: https://www.sqlgate.com/. Now, let’s take a look at the use of CUBRID DB with SQLGate for CUBRID.

 

1. Installation

 

Complete the download and installation of the SQLGate for CUBRID at  https://www.cubrid.org/downloads 

sg1.png

 

 

 

2. Executing the SQLGate

 

log in to our registered email address and click OK

sg2.png

 

 

3. Connecting to the installed CUBRID DB server

 

After entering the information to be connected, try the connection test, and when the connection is performed, a window as shown in the figure below is executed.

sg3.png

 

 

sg4.png

 

 

4. Table Object Explorer

 

You can check the table list and information of the DB server by clicking the object explorer button, and use it to find the desired data by adding conditions. Also, you can use the object panel (F12) with a similar function.

sg5.png

 

 

5. Using the SQL editor

 

When writing and executing a query, SQLGate provides a multi-query/auto-complete function to facilitate query writing. In addition, there are various functions in the SQL editor, which can be checked in the SQLGate manual: https://docs.sqlgate.com/docs/en/0202-using-editor.html

 

6. Viewing and tuning the query execution plan

 sql>SELECT /*+ recompile */ DISTINCT h.host_year, o.host_nation
         FROM history h INNER JOIN olympic o ON h.host_year = o.host_year 
           AND o.host_year > 1950;

 

sg6.png

 

The above query execution plan confirms that the history h table is becoming JOIN as an inner table with a full scan. More data can impact performance.

 

After changing the join order, we will try to tune it so that it can JOIN by using INDEX SCAN on the table.

 

6-1. Index creation

You can create an index with the CREATE INDEX statement, or you can create it by clicking [Create]-[Index] on the top tab.

sql>CREATE INDEX cix_history_idx1 ON history (host_year);

sg7.png

 

 

6-2. Check query execution plan after tuning

sg8.png

 

 

You can see that the table join sequence has been changed and JOIN has been made as INDEX SCAN has been performed as desired.

 

 

Today we have learned how to use SQLGate for CUBRID to perform queries and tune them. In addition, there are other functions such as exporting, importing, PL/SQL debugger, and ER design.

 

 

 

 

 


List of Articles
No. Category Subject Date
27 Interfaces Common Uses of CUBRID Node.js API with Examples file 2020.06.10
26 Server CUBRID Backup & Restore – Part I (Backup) file 2020.06.22
25 Server CUBRID Backup & Restore – Part II (Restore) file 2020.06.22
24 Server CUBRID Port and iptables (firewall) Configuration 2020.06.24
23 Server CUBRID Java Stored Procedures file 2020.06.24
22 Server CUBRID Configuration Guide to Launch Services 2020.06.24
21 Server Introduction to CUBRID Security – Part I file 2020.06.25
20 Server Introduction to CUBRID Security – Part II file 2020.06.26
19 Server Exploring CUBRID’s Useful Commands 2020.07.13
18 Server [CUBRID Utility] Let’s learn about restoreslave! file 2020.07.13
Board Pagination Prev 1 2 3 4 Next
/ 4

Join the CUBRID Project on