Jump to the post that solved this thread.
Solved: 1 Year, 5 Months, 1 Week ago Thank You Like - Recount very slow
#32
Solved: 1 Year, 5 Months, 1 Week ago
(2023-08-22, 03:00 PM)lost puppy Wrote: Solved by Laird

Thanks for indulging me in the tedious back-and-forth until I realised I could duplicate the issue on my own copy of phpMyAdmin, and debug alone.

For those who're curious, the cause seems to be that in phpMyAdmin, apparently, a bare query on the information_schema database irrevocably (for the set of simultaneously executed queries) changes the selected database to information_schema, causing subsequent ALTER TABLE queries on the intended (otherwise-selected) database to fail. That is to say that even though, say, the mybb database is selected, after running a bare query on information_schema, the value returned by SELECT database(); becomes information_schema, and use mybb; doesn't change it back to the mybb database.

The 1.1.0 version of the script I'd attached generated such a bare query:

SELECT COUNT(*)
INTO   @exist
FROM   information_schema.columns
WHERE  table_schema = database()
       AND
       column_name = 'tyl_tnumtyls'
       AND
       table_name = '{$db->table_prefix}threads';

Wrapping that bare query in a prepared statement seems to solve the problem.

I've again updated the script attached to the post selected as the solution. It is now at version 1.1.1.

(2023-08-22, 03:00 PM)lost puppy Wrote: ... who is a proper Rock Star  Heart

Superb being and I wish to thank him for all his time and devotion to getting thing PERFECT

Time difference is just so very massive I can't begin to say.

24 hours and wouldn't / couldn't finish!

Under a minute >>>> complete and perfect  Big Grin

Thank you Laird

You're very welcome, and thank you for your generous praise.
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 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: 2 Guest(s)