Impostazioni per le query di grandi dimensioni
Stai visualizzando una vecchia versione di questo article. Visualizza
la versione più recente.
MariaDB 5.3 (e 5.5) presenta alcune funzionalità che sono utili per l'esecuzioni di query di grandi dimensioni e pertanto sono disabilitate per default.
Questa pagina illustra le impostazioni raccomandate per le query che lavorano con grandi quantità di record in I/O.
First, turn on Batched Key Access:
# Turn on disk-ordered reads optimizer_switch='mrr=on' optimizer_switch='mrr_cost_based=off' # Turn on Batched Key Access (BKA) join_cache_level = 6
Give BKA buffer space to operate on. Ideally, it should have enough space to fit all the data examined by the query.
# Size limit for the whole join join_buffer_space_limit = 300M # Limit for each individual table join_buffer_size = 100M
Turn on index_merge/sort-intersection:
optimizer_switch='index_merge_sort_intersection=on'
If your queries examine big fraction of the tables (somewhere more than ~ 30%), turn on hash join:
# Turn on both Hash Join and Batched Key Access join_cache_level = 8
Commenti
Sto caricando i commenti......
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.