Нет mysql не перезапускается. Если перейти на другую страницу то все хорошо. Я через сфинкс получаю ид товаров и далее делаю запрос
SELECT t.rating, ROUND( p.suma / t.massa, 2 ) AS suma_tovar, p.suma AS suma, t.massa, t.id AS id, p.is_confrim, t.name AS tovar_name, t.categories_id, um.name as unit_measure_name, t.name as name_tovar, t.suma as suma, p.user_id as price_user_id, p.date_cr as price_date_cr, p.id as price_id, pr_prod.id as tosh_prodavez_id, pr_prod.name as tosh_prodavez_name, tosh.id as tosh_id, reg.name as region_name, gor.name as gorod_name, tosh.uliza as tosh_uliza, tosh.dom as tosh_dom, tosh.korpus as tosh_korpus, tosh.stronie as tosh_stronie, tosh.floor as tosh_floor, tosh.office as tosh_office, tosh.position as tosh_position, p.user_id as price_user_id, profil_prodavez_price_avtor.name as name_profil_prodavez_price_avtor, profil_user_price_avtor.pseudonym as pseudonym_profil_user_price_avtor, price_avtor.cat as price_avtor_cat, tosh_user.reting as tosh_user_rating, (SELECT AVG(reting) FROM rating_tovar WHERE tovar_id=t.id) as tovar_rating FROM tovar t LEFT JOIN price_top pr ON pr.tovar_id = t.id LEFT JOIN price p ON p.id = pr.price_id LEFT JOIN user price_avtor ON price_avtor.id = p.user_id LEFT JOIN profil_user profil_user_price_avtor ON profil_user_price_avtor.user_id = p.user_id LEFT JOIN profil_prodavez profil_prodavez_price_avtor ON profil_prodavez_price_avtor.user_id = p.user_id LEFT JOIN toshka_prodash tosh ON tosh.id = pr.toshka_prodash_id LEFT JOIN user tosh_user ON tosh_user.id = tosh.user_id LEFT JOIN profil_prodavez pr_prod ON pr_prod.user_id = tosh_user.id LEFT JOIN unit_measure um ON um.id = t.unit_measure_id LEFT JOIN region reg ON reg.id = tosh.region_id LEFT JOIN gorod gor ON gor.id = tosh.gorod_id WHERE t.id IN (42099,42100,42101,42102,42103,42104,42105,42106,42107,42108,52424,52425,52426,52463,52523,52525,52526,52527,52530,52560) ORDER BY IF( p.is_confrim=0, 1, 2), IF( week(NOW())-week(p.date_cr) <3, 3, 4), suma_tovar ASC
Тот же самый запрос на других страниц работает очень хорошо, только с другими limit offset
Отредактированно nekulin (18.07.2012 18:37:51)