|
| 1 | +CREATE TABLE test ( |
| 2 | + ts TIMESTAMP TIME INDEX, |
| 3 | + msg TEXT, |
| 4 | +); |
| 5 | + |
| 6 | +Affected Rows: 0 |
| 7 | + |
| 8 | +INSERT INTO test VALUES |
| 9 | +(1,"The quick brown fox jumps over the lazy dog"), |
| 10 | +(2,"The quick brown fox jumps over the lazy cat"), |
| 11 | +(3,"The quick brown fox jumps over the lazy mouse"), |
| 12 | +(4,"The quick brown fox jumps over the lazy rabbit"), |
| 13 | +(5,"The quick brown fox jumps over the lazy turtle"); |
| 14 | + |
| 15 | +Affected Rows: 5 |
| 16 | + |
| 17 | +SELECT * FROM test; |
| 18 | + |
| 19 | ++-------------------------+------------------------------------------------+ |
| 20 | +| ts | msg | |
| 21 | ++-------------------------+------------------------------------------------+ |
| 22 | +| 1970-01-01T00:00:00.001 | The quick brown fox jumps over the lazy dog | |
| 23 | +| 1970-01-01T00:00:00.002 | The quick brown fox jumps over the lazy cat | |
| 24 | +| 1970-01-01T00:00:00.003 | The quick brown fox jumps over the lazy mouse | |
| 25 | +| 1970-01-01T00:00:00.004 | The quick brown fox jumps over the lazy rabbit | |
| 26 | +| 1970-01-01T00:00:00.005 | The quick brown fox jumps over the lazy turtle | |
| 27 | ++-------------------------+------------------------------------------------+ |
| 28 | + |
| 29 | +ADMIN FLUSH_TABLE('test'); |
| 30 | + |
| 31 | ++---------------------------+ |
| 32 | +| ADMIN FLUSH_TABLE('test') | |
| 33 | ++---------------------------+ |
| 34 | +| 0 | |
| 35 | ++---------------------------+ |
| 36 | + |
| 37 | +-- No fulltext index yet |
| 38 | +SELECT index_size FROM INFORMATION_SCHEMA.REGION_STATISTICS; |
| 39 | + |
| 40 | ++------------+ |
| 41 | +| index_size | |
| 42 | ++------------+ |
| 43 | +| 0 | |
| 44 | ++------------+ |
| 45 | + |
| 46 | +ALTER TABLE test MODIFY COLUMN msg SET FULLTEXT INDEX; |
| 47 | + |
| 48 | +Affected Rows: 0 |
| 49 | + |
| 50 | +ADMIN BUILD_INDEX('test'); |
| 51 | + |
| 52 | ++---------------------------+ |
| 53 | +| ADMIN BUILD_INDEX('test') | |
| 54 | ++---------------------------+ |
| 55 | +| 0 | |
| 56 | ++---------------------------+ |
| 57 | + |
| 58 | +-- SQLNESS SLEEP 1s |
| 59 | +-- Fulltext index built |
| 60 | +SELECT index_size FROM INFORMATION_SCHEMA.REGION_STATISTICS; |
| 61 | + |
| 62 | ++------------+ |
| 63 | +| index_size | |
| 64 | ++------------+ |
| 65 | +| 318 | |
| 66 | ++------------+ |
| 67 | + |
0 commit comments