i have such long text that over bytes limit of index. The text doesn't have any space. it's combination of things like dbname and table_name.
I will query only check exactly same
select * from table where column='text'
or
if i use full text search it may like this.
select * from table where Match (column) Against(text)
i don't know which one is best between two options below.
i will use text_example = '{dbName}/{tableName}'
for explain but in real, it's combination of at least 5types of string.
option1. use full text search
option2. use index To use index, i have to split text_example to 5types. And then create index each types.
create table info (
dbName text,
tableName text,
index dbIdx (dbName),
index tableIdx (tableName)
);
insert query will often.
In this case, which one is best aspects of storage? how about performance?
or is there any good way to improve select query with such long text? FYI, i use mysql 8.0
/
, separates "words" for the purpose of FULLTEXT
.col = 'text'
checks the whole column; MATCH..AGAINST
checks "words" in the column. That is, they do different things.Please clarify what the real text is like and what the real query is like. Then we can advise on FULLEXT
versus BTREE
.