Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 201
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 182
Total: 182

Author Topic: Do not run a query Mysql  (Read 5312 times)

0 Members and 1 Guest are viewing this topic.

Offline GeorG

  • Member
  • *
  • Posts: 26
    • View Profile
    • RPGRUSSIA
Do not run a query Mysql
« on: February 08, 2017, 02:01:25 am »
Hangs when the additional units (options: Gallery Index Settings)
Smotrte screen output mytop


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).


Conversion to AEVA.

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

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

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

Конвертация с AEVA.
« Last Edit: February 08, 2017, 02:24:36 am by GeorG »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Do not run a query Mysql
« Reply #1 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.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline GeorG

  • Member
  • *
  • Posts: 26
    • View Profile
    • RPGRUSSIA
Re: Do not run a query Mysql
« Reply #2 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.


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

Ru:
Если запускать без "explain", то процесс зависает
« Last Edit: February 08, 2017, 09:08:28 am by GeorG »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Do not run a query Mysql
« Reply #3 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.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline GeorG

  • Member
  • *
  • Posts: 26
    • View Profile
    • RPGRUSSIA
Re: Do not run a query Mysql
« Reply #4 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
« Last Edit: February 10, 2017, 02:00:54 am by GeorG »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Do not run a query Mysql
« Reply #5 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);
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline GeorG

  • Member
  • *
  • Posts: 26
    • View Profile
    • RPGRUSSIA
Re: Do not run a query Mysql
« Reply #6 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:
Такой индекс уже есть).


Hangs when included option circled
(ru:
Зависает когда включены обведенные опции):


Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Do not run a query Mysql
« Reply #7 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.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline GeorG

  • Member
  • *
  • Posts: 26
    • View Profile
    • RPGRUSSIA
Re: Do not run a query Mysql
« Reply #8 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).
Но возможно это вам поможет оптимизировать работу галереи.
« Last Edit: February 10, 2017, 08:29:17 am by GeorG »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Do not run a query Mysql
« Reply #9 on: February 10, 2017, 08:11:58 am »
Do you have phpmyadmin that would help. Can run some test queries.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline GeorG

  • Member
  • *
  • Posts: 26
    • View Profile
    • RPGRUSSIA
Re: Do not run a query Mysql
« Reply #10 on: February 10, 2017, 08:27:34 am »
Available in phpmyadmin in PM

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Do not run a query Mysql
« Reply #11 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
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/
Like Like x 1 View List

Offline GeorG

  • Member
  • *
  • Posts: 26
    • View Profile
    • RPGRUSSIA
Re: Do not run a query Mysql
« Reply #12 on: February 10, 2017, 08:56:57 am »
Thanks, now works gallery ;)

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
4043 Views
Last post January 31, 2008, 05:28:27 pm
by SMFHacks
4 Replies
5914 Views
Last post July 11, 2016, 12:50:54 pm
by shuban
1 Replies
3576 Views
Last post August 17, 2016, 06:12:18 pm
by SMFHacks
2 Replies
3033 Views
Last post January 11, 2017, 02:52:03 pm
by shuban
6 Replies
6180 Views
Last post June 26, 2017, 10:42:01 am
by kirkvan

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal