• Home
  • Get help
  • Ask a question
Last post 35 min ago
Posts last week 141
Average response time last week 4 hours 42 min
All time posts 67817
All time tickets 10479
All time avg. posts per day 21

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#2857 – Hits - Slow SQL UPDATE

Posted in ‘sh404SEF’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Monday, 17 October 2016 19:52 UTC
matt6697
Hi,

I noticed a SQL UPDATE query triggered by SH404SEF for each visit of an article page. Example provided below. The website is running Joomla 3.6.2 / PHP7 / MYSQL 5.5

UPDATE `hl7c9_sh404sef_urls`

SET `cpt`=97942, `last_hit`='2016-10-17 19:46:07'

WHERE `id`='29436'

AND `rank`=0;



This UPDATE can take quite a long time depending on the database server load.

Is there a way to disable the hits counter in SH404SEF to avoid having this query slowing the loading of the pages ?

Which MYQL engine is recommended for SH404SEF tables ? MYISAM ? INNODB ?

Cheers

Matthieu
Tuesday, 18 October 2016 08:22 UTC
wb_weeblr
Hi

Sorry, you can't disable that. It's normally not a very high overhead.

You can manually remove it if you like, by commenting out line 1304 in /administrator/components/com_sh404sef/classes/router.php:

ShlDbHelper::update('#__sh404sef_urls', array('cpt' => $hits, 'last_hit' => ShlSystem_Date::getUTCNow()), array('id' => $lookUp->urlRecord->id, 'rank' => 0));


but you would have to redo this change after each update.

Though we're not DB admins, Innodb seems the way forward, and is the default for most MYSQL servers anyway.

Rgds
 
Tuesday, 18 October 2016 22:30 UTC
matt6697

Hi,

Thanks for your answer. Could you include an option to disable this hit counter in a future release ?

Cheers


Le 18 oct. 2016 10:22, "Weeblr" <[email protected]> a écrit :

Wednesday, 19 October 2016 06:49 UTC
wb_weeblr
HI

I'm afraid this is unlikely to happen. We had one since the beginning, and actually removed it a few years ago, as is was only causing confusion. it was off by default and people kept asking why hit counts was always 0. Beside, there is now the last_hit_data that's used in the backend for filtering, and not having it would be an issue.

A question though, why is this query taking so much time? is you db table MyIsam maybe, instead of Innodb?

Rgds


 
Thursday, 03 November 2016 05:34 UTC
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.