To post a new support question, click the Post New Topic button below.
Current Version: 4.9.3 | Sytist Manual | Common  Issues | Feature Requests

Please log in or Create an account to post or reply to topics.
You will still receive notifications of replies to topics you are part of even if you do not subscribe to new topic emails.

Pages With Photos By Tags Loading Very Slow

135 posts
Sat Nov 18, 23 8:14 AM CST

Hi Tim

Sytist works very well for years now, and after some tuning on my own server it's very very fast. But only when working with some pages with 'Photos by tags' enabled, queries take a long time compared to all other queries on the site.

For example this query shows up in the slow query log (I'm using MariaDB 10.11, PHP 8.2, Nginx): SELECT * FROM ms_photos LEFT JOIN ms_photo_keywords_connect  ON ms_photos.pic_id=ms_photo_keywords_connect.key_pic_id  LEFT JOIN ms_blog_photos ON ms_photos.pic_id=ms_blog_photos.bp_pic  WHERE (  key_key_id='18428'  OR bp_blog='2100'  )   AND pic_no_dis<='0' GROUP BY pic_id;

Is there anything I can do with this to speed some things up? I checked all columns have individual indexes, but will it help to create a multi-column index somewhere in sql? (I'm not that experienced with it)

135 posts
Sat Nov 18, 23 8:17 AM CST

This is a full log report of one go those queries, with some blurring of private data:

# Time: 231118 15:08:10

# User@Host: ****[****] @ localhost []

# Thread_id: 6  Schema: ****  QC_hit: No

# Query_time: 1.336618  Lock_time: 0.000018  Rows_sent: 26  Rows_examined: 1128029

# Rows_affected: 0  Bytes_sent: 27817

SET timestamp=1700316490;

SELECT * FROM ms_photos LEFT JOIN ms_photo_keywords_connect  ON ms_photos.pic_id=ms_photo_keywords_connect.key_pic_id  LEFT JOIN ms_blog_photos ON ms_photos.pic_id=ms_blog_photos.bp_pic  WHERE (  key_key_id='18424'  OR bp_blog='2012'  )   AND pic_no_dis<='0' GROUP BY pic_id;

16,262 posts (admin)
Mon Nov 20, 23 5:08 AM CST

All of those fields should already have indexes. I don't know how else to speed that up.

Tim Grissett, DIA - PicturesPro.com
My Email Address: info@picturespro.com
3 total messages
Please log in or Create an account to post or reply to topics.
This post has been viewed 124 times
 
Loading more pages
Loading more pages

Sign up for email promotions.

Your information is safe with us and won't be shared.

Thank you for signing up!

 
©2003 - 2021 Grissett, LLC. All Rights Reserved.

By continuing to browse or by clicking Accept Cookies, you agree to the storing of cookies on your device necessary to provide you with the services available through our website.

    Accept   Privacy & Cookie Policy
Loading More Photos
Scroll To Top
Close Window
Loading
Close