Skip to Content
0
Former Member
Oct 28, 2015 at 12:10 PM

Flexi-Search workaround Too many tables; MySQL can only use 61 tables in a join

326 Views

Hi Experts,

we have 62 languages in our system. And we want to get all items where a localized attribute has a specific value:

 select count({pk}) from {MyProduct},{CatalogVersion as CV}, {Catalog as C} where {catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND ({C:id}='XX' and {CV:version} != 'Global') and ({activeLoc[ar_ae]:o}= true OR 
 {activeLoc[cs]:o}= true OR 
 {activeLoc[de]:o}= true OR 
 {activeLoc[de_at]:o}= true OR 
 {activeLoc[de_ch]:o}= true OR 
 {activeLoc[dk]:o}= true OR 
 {activeLoc[el]:o}= true OR 
 {activeLoc[en]:o}= true OR 
 {activeLoc[en-AU]:o}= true OR 
 {activeLoc[en-IN]:o}= true OR 
 {activeLoc[en-uk]:o}= true OR 
 {activeLoc[en_ae]:o}= true OR 
 {activeLoc[en_ca]:o}= true OR 
 {activeLoc[en_ch]:o}= true OR 
 {activeLoc[en_eu]:o}= true OR 
 {activeLoc[en_id]:o}= true OR 
 {activeLoc[en_imea]:o}= true OR 
 {activeLoc[en_la]:o}= true OR 
 {activeLoc[en_my]:o}= true OR 
 {activeLoc[en_ph]:o}= true OR 
 {activeLoc[en_sa]:o}= true OR 
 {activeLoc[en_sg]:o}= true OR 
 {activeLoc[en_th]:o}= true OR 
 {activeLoc[en_vn]:o}= true OR 
 {activeLoc[en_za]:o}= true OR 
 {activeLoc[es]:o}= true OR 
 {activeLoc[es_la]:o}= true OR 
 {activeLoc[et]:o}= true OR 
 {activeLoc[fi]:o}= true OR 
 {activeLoc[fr]:o}= true OR 
 {activeLoc[fr_be]:o}= true OR 
 {activeLoc[fr_ca]:o}= true OR 
 {activeLoc[fr_ch]:o}= true OR 
 {activeLoc[he]:o}= true OR 
 {activeLoc[hr]:o}= true OR 
 {activeLoc[hu]:o}= true OR 
 {activeLoc[id]:o}= true OR 
 {activeLoc[it]:o}= true OR 
 {activeLoc[it_ch]:o}= true OR 
 {activeLoc[ja]:o}= true OR 
 {activeLoc[kr]:o}= true OR 
 {activeLoc[lt]:o}= true OR 
 {activeLoc[lv]:o}= true OR 
 {activeLoc[nl]:o}= true OR 
 {activeLoc[nl_be]:o}= true OR 
 {activeLoc[no]:o}= true OR 
 {activeLoc[pl]:o}= true OR 
 {activeLoc[pt]:o}= true OR 
 {activeLoc[pt_la]:o}= true OR 
 {activeLoc[ro]:o}= true OR 
 {activeLoc[ru]:o}= true OR 
 {activeLoc[ru_ua]:o}= true OR 
 {activeLoc[se]:o}= true OR 
 {activeLoc[sk]:o}= true OR 
 {activeLoc[sl]:o}= true OR 
 {activeLoc[th]:o}= true OR 
 {activeLoc[tr]:o}= true OR 
 {activeLoc[uk]:o}= true OR 
 {activeLoc[vi]:o}= true OR 
 {activeLoc[zh]:o}= true OR 
 {activeLoc[zh_tw]:o}= true )

If I have exactly 58 checks, it works fine, if I have 59 I'm getting the Exception from mysql in the title. Any ideas to workaround this using flexi search? Thanks!