Future FULLTEXT Check

I have a FULLTEXT index called cart_product_ftiin a table

Whenever I use it, I have to specify exactly all the fields that are in the index:

MATCH (foo,bar,etc)

My thoughts: if later I decide to add / remove a field to the index, all the scripts will need to be updated or they will be broken.

So I'm wondering if there is a way to get a list of all the fields in the index and then paste the list into mine MATCH(), so it doesn’t need to be updated if the index is changed in FULLTEXT?

+3
source share
2 answers

Possible solutions:

  • . , , 1 2 /datarelation, .

  • information_schema.statistics ( ).

  • , , / .

: - key_column_usage, , FULLTEXT, information_schema.statistics?

+1

, SQL SHOW INDEXES FROM <table>.

, . .

- , , .

+1

Source: https://habr.com/ru/post/1755326/


All Articles