Jump to the post that solved this thread.
Solved: 1 Year, 5 Months, 1 Week ago Thank You Like - Recount very slow
#5
Solved: 1 Year, 5 Months, 1 Week ago
(2023-08-21, 08:04 AM)Laird Wrote:
(2023-08-20, 02:18 PM)lost puppy Wrote: It would be brilliant to have the manual queries to run?

Attached is a script that hopefully will work for you. The instructions are in a comment block up the top. Please let me know how you go with it, and especially the time it takes the SQL to run on a board with the millions of thanks/likes that yours has. If it's successful, I'll probably add it to the plugin itself, in the plugin's scripts directory.

WOW .... thank you for doing this  Heart

I ran it on my test site which has 3,499,755 likes in the db 

   

There are 6 queries (I think lol) and the first 4 .... each took seconds (I mean the db states 0.0004 for each one)
Only problem was on the 5th query where it returned (I have redacted my db prefix):

UPDATE REDACTED_threads t
SET    tyl_tnumtyls = IFNULL(
                             (
                              SELECT SUM(tyl_pnumtyls)
                              FROM   REDACTED_posts p
                              WHERE  p.tid = t.tid
                             ),
                             0
                            );
MySQL said: Documentation

#1054 - Unknown column 'tyl_tnumtyls' in 'field list'


But it would definitely seem that it worked anyway  Big Grin

Taking 2 members:

On the real site forum Member 1 has 29671 'likes' >> but now on the 'test' site the member has 33690
Member 2 on the real forum has 381953 'likes' >> on 'test' site they now have 424704

Speed wise .... well what can I say ... last time it took near 24 hours and didn't complete (I had to stop it) 

This took seconds!!

Stunning ... thank you so very much ... you are a super star  Cool
Reply
Jump to the post that solved this thread.


Messages In This Thread
RE: Thank You Like - Recount very slow - by Laird - 2023-08-19, 11:40 AM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-21, 08:04 AM
RE: Thank You Like - Recount very slow - by lost puppy - 2023-08-21, 04:43 PM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 01:32 AM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 09:14 AM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 10:27 AM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 11:11 AM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 11:28 AM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 12:13 PM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 12:30 PM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 12:42 PM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 12:58 PM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 01:08 PM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 01:51 PM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 02:28 PM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 02:52 PM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-23, 01:02 AM

Forum Jump:


Users browsing this thread: 20 Guest(s)