Debugging with Doris Client Tools (Common Commands)

Doris is a high-performance, open-source relational database management system. Using Doris client tools for debugging can help developers quickly identify and resolve issues. Below are the commonly used debugging commands in Doris client tools:

Connection and Login

Connect to a Doris Instance

-- Connect to a Doris instance
doris -u  -p  -D 

For example:

doris -u root -p 123456 -D my_database

Login to a Doris Instance

-- Login to a Doris instance
doris -u  -p 

For example:

doris -u root -p 123456

Debugging and Inspection

View System Information

-- View system information
SHOW SYSTEM_VERSION;

View Table Structure

-- View table structure
SHOW COLUMNS FROM ;

For example:

SHOW COLUMNS FROM my_table;

View Data

-- View data
SELECT * FROM ;

For example:

SELECT * FROM my_table;

Transactions and Locking

Start Transaction

-- Start transaction
BEGIN TRANSACTION;

End Transaction

-- End transaction
COMMIT TRANSACTION;

Or

-- If the transaction fails, you can rollback
ROLLBACK TRANSACTION;

Optimization and Performance

Analyze Query Plan

-- Analyze query plan
EXPLAIN ;

For example:

EXPLAIN SELECT * FROM my_table WHERE condition = 'value';

View System Tablespace Information

-- View system tablespace information
SHOW SYSTEM_TABLESPACES;

View Session Status

-- View session status
SHOW SESSION_STATUS;

Restart Service

-- Restart service
DORIS_RESTART;

Other Options

View Help Documentation

-- View help documentation
HELP ;

For example:

HELP SHOW COLUMNS;

View Version Information

-- View version information
SHOW VERSION;

Exit Client

-- Exit client
EXIT;

These commands can help developers better understand the internal workings of Doris, optimize performance, and resolve issues.