Help Center/ GaussDB(for MySQL)/ FAQs/ Database Usage/ Why Are the Results Inconsistent After the MATCH AGAINST Statement Is Executed, Respectively, on Primary Nods and Read Replicas?
Updated on 2023-10-19 GMT+08:00

Why Are the Results Inconsistent After the MATCH AGAINST Statement Is Executed, Respectively, on Primary Nods and Read Replicas?

MATCH GAINST is used to search for MySQL full-text indexes. For rows in the table, MATCH returns relevance values, that is, a similarity measure between the search string (given as the argument to AGAINST() function and the text in that row in the columns named in the MATCH() list). This statement uses the stat_n_rows value to calculate the relevance value. Primary nodes and read replicas use different methods to obtain the stat_n_rows value. The primary nodes use the persistent method and the read replicas use the transient method. Therefore, the obtained values are slightly different from each other. The execution result of MATCH AGAINST on primary nodes and read replicas are different.