mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-05 21:02:58 +00:00
* feat: prepare for index_build command Signed-off-by: SNC123 <sinhco@outlook.com> * feat: impl manual index build Signed-off-by: SNC123 <sinhco@outlook.com> * chore: clippy and fmt Signed-off-by: SNC123 <sinhco@outlook.com> * test: add idempotency check for manual build Signed-off-by: SNC123 <sinhco@outlook.com> * chore: apply suggestions Signed-off-by: SNC123 <sinhco@outlook.com> * chore: update proto Signed-off-by: SNC123 <sinhco@outlook.com> * chore: apply suggestions Signed-off-by: SNC123 <sinhco@outlook.com> * chore: fmt Signed-off-by: SNC123 <sinhco@outlook.com> * chore: update proto souce to greptimedb Signed-off-by: SNC123 <sinhco@outlook.com> * fix: cargo.lock Signed-off-by: SNC123 <sinhco@outlook.com> --------- Signed-off-by: SNC123 <sinhco@outlook.com>
30 lines
723 B
SQL
30 lines
723 B
SQL
CREATE TABLE test (
|
|
ts TIMESTAMP TIME INDEX,
|
|
msg TEXT,
|
|
);
|
|
|
|
INSERT INTO test VALUES
|
|
(1,"The quick brown fox jumps over the lazy dog"),
|
|
(2,"The quick brown fox jumps over the lazy cat"),
|
|
(3,"The quick brown fox jumps over the lazy mouse"),
|
|
(4,"The quick brown fox jumps over the lazy rabbit"),
|
|
(5,"The quick brown fox jumps over the lazy turtle");
|
|
|
|
SELECT * FROM test;
|
|
|
|
ADMIN FLUSH_TABLE('test');
|
|
|
|
-- SQLNESS SLEEP 1s
|
|
-- No fulltext index yet
|
|
SELECT index_size FROM INFORMATION_SCHEMA.REGION_STATISTICS;
|
|
|
|
ALTER TABLE test MODIFY COLUMN msg SET FULLTEXT INDEX;
|
|
|
|
ADMIN BUILD_INDEX('test');
|
|
|
|
-- SQLNESS SLEEP 1s
|
|
-- Fulltext index built
|
|
SELECT index_size FROM INFORMATION_SCHEMA.REGION_STATISTICS;
|
|
|
|
DROP TABLE test;
|