SMFHacks.com

SMF Gallery Pro => Support => Topic started by: GeorG on February 08, 2017, 02:01:25 am

Title: Do not run a query Mysql
Post by: GeorG on February 08, 2017, 02:01:25 am
Hangs when the additional units (options: Gallery Index Settings)
Smotrte screen output mytop
(http://ipic.su/img/img7/tn/mytop.1486541874.png) (http://ipic.su/img/img7/fs/mytop.1486541874.png)

Request from Gallery_MainPageBlock function, Gallery2.php file:
Code: [Select]
// Check what type it is
$query = "
SELECT
p.id_picture, p.commenttotal, p.totalratings, p.rating, p.filesize, p.views,
p.thumbfilename, p.title, p.id_member, m.real_name, p.date, p.description,
p.mature, c.view, (p.rating / p.totalratings ) AS ratingaverage, v.id_picture as unread, mg.online_color,
p.totallikes


SMF Gallery PRO 7.1 (license period has expired).
Statistics on the screenshot (can be useful).
(http://ipic.su/img/img7/tn/stats.1486541816.png) (http://ipic.su/img/img7/fs/stats.1486541816.png)

Conversion to AEVA.

Ru:
Зависает при включении дополнительных блоков (опции: Gallery Index Settings)
Смотрте скрин вывода mytop

Запрос из функции Gallery_MainPageBlock, файл Gallery2.php

SMF Gallery  PRO 7.1 (срок лицензии уже истёк).
Статистика на скрине (может пригодиться).

Конвертация с AEVA.
Title: Re: Do not run a query Mysql
Post by: SMFHacks on February 08, 2017, 06:32:43 am
Can you get me the whole query from the output. Not sure what query it is since there are multiple options

Also if you run the query and do an "explain" in front of the select that would be helpful.
Title: Re: Do not run a query Mysql
Post by: GeorG on February 08, 2017, 08:25:11 am
I do not quite understand in English.
I can give you access to the test server, check it yourself?

ru:
Я плохо понимаю по английски.
Могу дать доступ к тестовому серверу, там проверите сами?


Quote
Also if you run the query and do an "explain" in front of the select that would be helpful.
(http://ipic.su/img/img7/tn/12121211.1486566410.png) (http://ipic.su/img/img7/fs/12121211.1486566410.png)

If run without "explain", then the process stops responding

Ru:
Если запускать без "explain", то процесс зависает
Title: Re: Do not run a query Mysql
Post by: SMFHacks on February 08, 2017, 08:55:03 pm
How many picutres do you have in your gallery?
Are you on shared hosting, vps hosting or dedicated?
If vps or dedicated did you install myself yourself? If so attach your my.cnf file located in the /etc/ folder.
Title: Re: Do not run a query Mysql
Post by: GeorG on February 10, 2017, 01:57:45 am
How many picutres do you have in your gallery?
More than 19,000
There is a great album, in it 7934 images

Quote
If so attach your my.cnf file located in the /etc/ folder.
Look in the archive
Title: Re: Do not run a query Mysql
Post by: SMFHacks on February 10, 2017, 07:02:29 am
Run these two sql queries on your forums database
Code: [Select]
alter table smf_gallery_pic add index views (views);
alter table smf_gallery_catperm add index id_group (id_group);
Title: Re: Do not run a query Mysql
Post by: GeorG on February 10, 2017, 07:43:32 am
Code: [Select]
alter table smf_gallery_catperm add index id_group (id_group);Succeeded.

Code: [Select]
alter table smf_gallery_pic add index views (views);#1061 - Duplicate key name 'views'

Such an index is already
(ru:
Такой индекс уже есть).
(http://ipic.su/img/img7/tn/index.1486733880.jpg) (http://ipic.su/img/img7/fs/index.1486733880.jpg)

Hangs when included option circled
(ru:
Зависает когда включены обведенные опции):
(http://ipic.su/img/img7/tn/3.1486734038.jpg) (http://ipic.su/img/img7/fs/3.1486734038.jpg)
Title: Re: Do not run a query Mysql
Post by: SMFHacks on February 10, 2017, 07:45:35 am
hmmm

I looked at the explain you posted earlier but I did not see any thing that had many rows returned.. Normally you put an index on anything in the where clause which is not a simple 0 or 1 value.
Title: Re: Do not run a query Mysql
Post by: GeorG on February 10, 2017, 08:07:15 am
Sorry, unfortunately I do not understand you :(

According to the idea, I need a gallery only as a transitional stage for conversion to the gallery Xenforo (sonnb xengallery).
But maybe this will help optimize the performance of the gallery.

ru:
По идеи, мне нужна галерея только как переходной этап для конвертации на галерею Xenforo (sonnb xengallery).
Но возможно это вам поможет оптимизировать работу галереи.
Title: Re: Do not run a query Mysql
Post by: SMFHacks on February 10, 2017, 08:11:58 am
Do you have phpmyadmin that would help. Can run some test queries.
Title: Re: Do not run a query Mysql
Post by: GeorG on February 10, 2017, 08:27:34 am
Available in phpmyadmin in PM
Title: Re: Do not run a query Mysql
Post by: SMFHacks on February 10, 2017, 08:49:29 am
Made it faster
ALTER TABLE `smf_gallery_log_mark_view` ENGINE = InnoDB

smf_gallery_log_mark_view was MyISAM
Title: Re: Do not run a query Mysql
Post by: GeorG on February 10, 2017, 08:56:57 am
Thanks, now works gallery ;)