如果您希望使用MySQL 全文检索功能,请说明关于外地的完整文本索引,编号为VARCHAR。 由于电离层是INSERTed 和UPDATEd,我的sql必须随时更新指数。 我的问题是: 当MySQL重建一个多边贸易体系指数时?
- A) Immediately after a INSERT or UPDATE occurs that affects the index.
- B) When the first SELECT is run that needs the index which has recently been affected by a UPDATE or INSERT.
- C) Something else.
Unecessary background info: My experience seems to think option B. Is this right? I ask because I have been experiencing sudden random slow queries which do a Full Text Search and I don t know why some are slow and not the others. My hunch is that the queries can be slow if they are waiting for mysql to rebuild the FTS index, but I don t know if this is how mysql works. Example of a random slow query (usually the same query runs under a second), there is no slow UPDATE or INSERT in the slow log:
# Query_time: 61.775612 Lock_time: 10.110924 Rows_sent: 20 Rows_examined: 222498
SELECT SQL_CALC_FOUND_ROWS id
FROM members
WHERE
AND MATCH (bio,profile_text,name) AGAINST ( building surveyor )
AND MATCH (town, postcode, country) AGAINST ( united kingdom, liverpool );
通知日期: 我看不出其他的INSERT或UPDATE在缓慢的标志中,因此我无法确定它正在等待什么。 正因为如此,我猜测,它可能等待重新建立金融体系指数?