tools/lastqps-test/README.md
A C program to test TDengine's query functionality with multi-threading and performance analysis.
taos_query_amake all
./taos_query_a_simple <test_mode>
./taos_query_a_simple 1
SQL Query:
SELECT tbname, last(*)
FROM test.meters
WHERE tbname IN ('d1','d2','d3','d4','d5','d6','d7','d8','d9','d10',
'd11','d12','d13','d14','d15','d16','d17','d18','d19','d20',
'd21','d22','d23','d24','d25','d26','d27','d28','d29','d30',
'd31','d32','d33','d34','d35','d36','d37','d38','d39','d40',
'd41','d42','d43','d44','d45','d46','d47','d48','d49','d50',
'd51','d52','d53','d54','d55','d56','d57','d58','d59','d60',
'd61','d62','d63','d64','d65','d66','d67','d68','d69','d70',
'd71','d72','d73','d74','d75','d76','d77','d78','d79','d80',
'd81','d82','d83','d84','d85','d86','d87','d88','d89','d90',
'd91','d92','d93','d94','d95','d96','d97','d98','d99','d100')
PARTITION BY tbname;
Parameters:
tbname IN condition filtering multiple tables./taos_query_a_simple 2
SQL Query:
SELECT last(ts, r32) FROM test.d1;
Parameters:
Both modes use the same connection settings:
../../debug/build/lib/libtaos.so127.0.0.1roottaosdatatestThe program measures and reports:
# Run table name IN query test (Mode 1)
./taos_query_a_simple 1
# Run sub-table query test (Mode 2)
./taos_query_a_simple 2
Tests query performance with tbname IN conditions:
tbname IN clausePARTITION BY tbname for groupingTests standard query performance on sub-tables:
test.d1)The program displays:
Make sure your TDengine server is running and accessible before executing the test program. The program will connect to the default TDengine instance unless modified in the source code.