tcms CURRENT_ITEM_TAGS_COMBINED

darkover
Posts: 1574
Joined: Sat Apr 13, 2013 8:59 pm

tcms CURRENT_ITEM_TAGS_COMBINED

Post by darkover »

Привет!

<thumb num=1-20 exclude_current_thumb=true tag=CURRENT_ITEM_TAGS_COMBINED num_range_shift=3-9>

выводит некоторые тумбы на галеры по 2-3-4 раза одинаковые
ап последний
admin
Site Admin
Posts: 38004
Joined: Wed Sep 10, 2008 11:43 am

Re: tcms CURRENT_ITEM_TAGS_COMBINED

Post by admin »

Скиньте плз дамп или админку и на какой галере смотреть, будет быстрее.
Don't forget to run script update
darkover
Posts: 1574
Joined: Sat Apr 13, 2013 8:59 pm

Re: tcms CURRENT_ITEM_TAGS_COMBINED

Post by darkover »

в ЛС все улетело.

немного оффтопа касаемо релейтов
вот выводим скажем 20 галер на паге с видео, и в большинстве случаев - это одни и те же галеры, как сделать этот вывод более уникальным, что бы они больше микшировались, кликать на них не кликают почти, а вот гугл в сопли клеит.
mad
Posts: 318
Joined: Fri Nov 30, 2012 4:01 pm

Re: tcms CURRENT_ITEM_TAGS_COMBINED

Post by mad »

Так num_range_shift=3-9 это же и делает.
Я обожаю SmartCJ :shock: :oops: :twisted:
admin
Site Admin
Posts: 38004
Joined: Wed Sep 10, 2008 11:43 am

Re: tcms CURRENT_ITEM_TAGS_COMBINED

Post by admin »

Да, спасибо, добавлена проверка.
Don't forget to run script update
darkover
Posts: 1574
Joined: Sat Apr 13, 2013 8:59 pm

Re: tcms CURRENT_ITEM_TAGS_COMBINED

Post by darkover »

Спасибо!
admin
Site Admin
Posts: 38004
Joined: Wed Sep 10, 2008 11:43 am

Re: tcms CURRENT_ITEM_TAGS_COMBINED

Post by admin »

NP)
Don't forget to run script update
darkover
Posts: 1574
Joined: Sat Apr 13, 2013 8:59 pm

Re: tcms CURRENT_ITEM_TAGS_COMBINED

Post by darkover »

Чет после апа, на ресах с этой конструкцией какая-то фигня
LA подскочило от обычных 5-7 до 25-30
в мускле наблюдаю такую картину
http://my.jetscreenshot.com/10779/20160 ... -137kb.jpg
darkover
Posts: 1574
Joined: Sat Apr 13, 2013 8:59 pm

Re: tcms CURRENT_ITEM_TAGS_COMBINED

Post by darkover »

чето медленных запросов стало ну очень много.

Code: Select all

# Query_time: 4.445392  Lock_time: 0.006007 Rows_sent: 80  Rows_examined: 244450
use ;
SET timestamp=1473284728;
SELECT   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, gi.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_stats54 as gs JOIN rot_gallery_data45 as gd on gd.gallery_id = gs.gallery_id 
			JOIN rot_gallery_info as gi on gi.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 gi.sponsor_id NOT IN (4)  and gs.group_id = 0  ORDER BY  tested_thumb DESC,  gs.total_ctr DESC  LIMIT 160, 80# queryitems;
# Time: 160908  0:45:29
# User@Host: [] @ localhost []
# Query_time: 6.854383  Lock_time: 0.053393 Rows_sent: 24  Rows_examined: 107692
use ;
SET timestamp=1473284729;
SELECT   DISTINCT(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, gi.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 JOIN rot_gallery_data1 as gd on gd.gallery_id = gs.gallery_id 
			JOIN rot_gallery_info as gi on gi.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 IN (259)  AND gs.gallery_id NOT IN ('214013')  ORDER BY  tested_thumb DESC,  gs.total_ctr DESC  LIMIT 72, 24# queryitems;
# Time: 160908  0:45:31
# User@Host: [] @ localhost []
# Query_time: 6.308397  Lock_time: 0.000207 Rows_sent: 20  Rows_examined: 450944
use ;
SET timestamp=1473284731;
SELECT   DISTINCT(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, gi.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_stats15 as gs STRAIGHT_JOIN rot_gallery_data1 as gd on gd.gallery_id = gs.gallery_id 
			STRAIGHT_JOIN rot_gallery_info as gi on gi.gallery_id = gs.gallery_id
JOIN rot_gal2tag on rot_gal2tag.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 gi.sponsor_id NOT IN (2,5,3)  and gs.group_id = 0  AND rot_gal2tag.tag_id IN ('2','3','8775','275','65','63','8790','257','17','9134','308')  AND gs.gallery_id NOT IN ('34098','34098','26747','39906','39166','15524','20410','20410','34653','22331','26747','39899','26747','20410','37631','14110','20073','13056','14882','39386','34098','39836','34098','34098','11329','39259','14096','39904','39150','26747','10616','35983','39099','38278','39899','38092','34653','19204','11509','10034','18423','28557','30717','14492','18334','30075')  ORDER BY  tested_thumb DESC,  gs.total_ctr DESC  LIMIT 100, 20# queryitems;
# User@Host: [] @ localhost []
# Query_time: 9.370747  Lock_time: 0.075084 Rows_sent: 40  Rows_examined: 358612
use ;
SET timestamp=1473284731;
SELECT   DISTINCT(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, gi.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_stats55 as gs STRAIGHT_JOIN rot_gallery_data48 as gd on gd.gallery_id = gs.gallery_id 
			STRAIGHT_JOIN rot_gallery_info as gi on gi.gallery_id = gs.gallery_id
JOIN rot_gal2tag on rot_gal2tag.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 gi.sponsor_id NOT IN (5,3)  and gs.group_id = 0  AND rot_gal2tag.tag_id IN ('21','29','123','154','290','741','746','761','901','962','1124','1262','1328','1479','1502','1919','1997','2081','3983','3984')  AND gs.gallery_id NOT IN ('5160')  ORDER BY  tested_thumb DESC,  gs.total_ctr DESC  LIMIT 160, 40# queryitems;
# Time: 160908  0:45:32
# User@Host: [] @ localhost []
# Query_time: 9.519942  Lock_time: 0.123219 Rows_sent: 70  Rows_examined: 348476
SET timestamp=1473284732;
admin
Site Admin
Posts: 38004
Joined: Wed Sep 10, 2008 11:43 am

Re: tcms CURRENT_ITEM_TAGS_COMBINED

Post by admin »

Да, к сожалению, выборка уникальных напрягает базу больше .. надо подумать что можно с этим сделать ..
Don't forget to run script update
Post Reply