Skip to content
  • Shaohua Wang's avatar
    9f79ead0
    BUG#16625973 - RED-BLACK TREE HOLDING THE FTS RESULTS COULD CONSUME TOO MUCH MEMORY · 9f79ead0
    Shaohua Wang authored
    Analysis:
    We deal with fts intermediate result and final result all in memory, 
    so if the result is hunders of millions, fts query will consumes large
    amount of memory, several GB. 300bytes for a matched doc in our experiment.
    
    Solution:
    Due to the fts framework of optimizer & innodb, we can't find a easy way to
    reduce the memory consumption. so we will create WL to address it in future.
    
    In the patch, we do the following two things:
    1. Change "words" in fts_ranking_t from "ib_rbt_t" to array. this can save 
    about 200 bytes for a matched doc.
    2. Set a cap for the memory consumption. if the query uses as much memory 
    as the cap, it will receive a error "fts query exceeds max allowed memory".
    
    rb://2387 approved by Jimmy Yang
    9f79ead0
    BUG#16625973 - RED-BLACK TREE HOLDING THE FTS RESULTS COULD CONSUME TOO MUCH MEMORY
    Shaohua Wang authored
    Analysis:
    We deal with fts intermediate result and final result all in memory, 
    so if the result is hunders of millions, fts query will consumes large
    amount of memory, several GB. 300bytes for a matched doc in our experiment.
    
    Solution:
    Due to the fts framework of optimizer & innodb, we can't find a easy way to
    reduce the memory consumption. so we will create WL to address it in future.
    
    In the patch, we do the following two things:
    1. Change "words" in fts_ranking_t from "ib_rbt_t" to array. this can save 
    about 200 bytes for a matched doc.
    2. Set a cap for the memory consumption. if the query uses as much memory 
    as the cap, it will receive a error "fts query exceeds max allowed memory".
    
    rb://2387 approved by Jimmy Yang
Loading