Mysql error 1969

drongo
Posts: 167
Joined: Mon Nov 05, 2012 1:06 pm

Re: Mysql error 1969

Post by drongo »

Админ сказал:
Без FORCE INDEX (group_activationdate) запрос отрабатывает за пол секунды, с FORCE INDEX (group_activationdate) - сотни...
Можно ли убрать?

SELECT SQL_CALC_FOUND_ROWS gs.gallery_id, gs.thumb_id, gi.sponsor_id, gi.content_count, gi.content_type, gs.total_shows, gs.total_clicks, gs.total_ctr, gt.thumb_url, gd.*, gi.content_count, gi.crop_profile_id, gs.activation_date, gi.added_date, gi.duration, gi.url, gi.gallery_total_shows, gi.sponsor_id, gi.source_url, gi.custom_gallery FROM rot_gallery_stats1 as gs FORCE INDEX (group_activationdate) JOIN rot_gallery_info as gi on gi.gallery_id = gs.gallery_id
JOIN rot_gallery_data1 as gd on gd.gallery_id = gs.gallery_id
JOIN rot_thumbs as gt on gt.thumb_id = gs.thumb_id
WHERE 1 = 1 AND gi.gallery_status = 'active' AND gi.gallery_type = 0 and gs.best_thumb = 'yes' and gs.group_id = 0 and gs.gallery_id NOT IN ( SELECT gallery_id FROM rot_gallery_stats1 WHERE group_id IN (293)) and MATCH (gd.alt, gd.description) AGAINST ('nasty fram girls having sex with animals porn pics' IN BOOLEAN MODE) ORDER BY activation_date DESC LIMIT 364, 52# queryitems
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Mysql error 1969

Post by admin »

тут у вас поиск в мускле самом

сфинкс пробовали?
Don't forget to run script update
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Mysql error 1969

Post by admin »

сам форс убрать можно в целом, но надо тестировать сначала на конкретных условиях
скиньте мне дамп базы, я проверю что реально есть разница
Don't forget to run script update
drongo
Posts: 167
Joined: Mon Nov 05, 2012 1:06 pm

Re: Mysql error 1969

Post by drongo »

Попробую сфинкс
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Mysql error 1969

Post by admin »

ok
Don't forget to run script update
Post Reply