The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
vB Global Translator - Multiply your indexed pages & put search traffic on autopilot Details »» | |||||||||||||||||||||||||||
vB Global Translator - Multiply your indexed pages & put search traffic on autopilot
Developer Last Online: Dec 2013
**Text Removed**
Show Your Support
|
Comments |
#282
|
||||
|
||||
What do you think Dave to write about it in mod description as known issues instead of telling new people about it over and over again... I saw question about this issue so many times... Also in PM.
|
#283
|
||||
|
||||
Was asking about miracle - I give you miracle. I changed one query in deletion of duplicated data and now it is very fast. I will just tell that before changes 1 query on 100 000 rows with 1000 duplicated rows took 10 minutes before update, now it takes less than 1 second!!!
So cleaning each table has 5 queries. 2 are instant, 2 are very fast and one took me 7 seconds on 100 000 rows - this one cannot be optimized, there is no any subquery, we just need to ask DB about those data. Hope now Dave will made new official release, which will not allow for data duplication in 2 of our 3 cache tables, and makes whole mod works faster, and your DB smaller. Below you have again full and updated description how to clean duplicated data. I was able to run this by my browser client, but be aware, that in case of some large databases, server can go away by this client and in such case you will need to use some other client than www. Also note that if you made changes described here (https://vborg.vbsupport.ru/showpost....&postcount=242) which I hope will be included in official release, then you will not have to remove duplicated data from wt_cache_short and wt_cache_medium anymore (only once during described procedure). And after that only wt_cache will need to delete duplicated data from time to time. So here you have again description and procedure, but much faster this time : If you would like to check do you have data duplication in your cache execute those queries (time consuming). Execute one by one - each one works on other cache table and tells you how many times and which data is duplicated (1st column duplication counter, 2nd for which originaltext, 3rd for which language): Code:
select count(*) counter, originaltext, tl from wt_cache group by originaltext, tl having count(*) > 1 order by counter desc; select count(*) counter, originaltext, tl from wt_cache_short group by originaltext, tl having count(*) > 1 order by counter desc; select count(*) counter, originaltext, tl from wt_cache_medium group by originaltext, tl having count(*) > 1 order by counter desc; Code:
CREATE TABLE saver ( id INT, tl VARCHAR(10), originaltext VARCHAR(65000) ) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE TABLE cleaner ( id INT ) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_general_ci; Code:
delete from cleaner; delete from saver; insert into saver (SELECT min(id) as id, tl, originaltext from wt_cache group by originaltext,tl having count(*) > 1); insert into cleaner (SELECT cache.id from saver, wt_cache cache where saver.originaltext=cache.originaltext and saver.tl=cache.tl and saver.id<>cache.id); DELETE FROM wt_cache USING wt_cache INNER JOIN cleaner ON wt_cache.id = cleaner.id; delete from cleaner; delete from saver; insert into saver (SELECT min(id) as id, tl, originaltext from wt_cache_short group by originaltext,tl having count(*) > 1); insert into cleaner (SELECT cache.id from saver, wt_cache_short cache where saver.originaltext=cache.originaltext and saver.tl=cache.tl and saver.id<>cache.id); DELETE FROM wt_cache_short USING wt_cache_short INNER JOIN cleaner ON wt_cache_short.id = cleaner.id; delete from cleaner; delete from saver; insert into saver (SELECT min(id) as id, tl, originaltext from wt_cache_medium group by originaltext,tl having count(*) > 1); insert into cleaner (SELECT cache.id from saver, wt_cache_medium cache where saver.originaltext=cache.originaltext and saver.tl=cache.tl and saver.id<>cache.id); DELETE FROM wt_cache_medium USING wt_cache_medium INNER JOIN cleaner ON wt_cache_medium.id = cleaner.id; |
#284
|
|||
|
|||
This product works with version 3.8.3
I tried but it does not work thanks Code: CREATE TABLE wt_cache ( id INT AUTO_INCREMENT NOT NULL PRIMARY KEY, tl VARCHAR(10), originaltext VARCHAR(65000), translated TEXT, INDEX(originaltext(323), tl) ) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_bin; CREATE TABLE wt_cache_medium ( id INT AUTO_INCREMENT NOT NULL PRIMARY KEY, tl VARCHAR(10), originaltext VARCHAR(255), translated VARCHAR(1000), INDEX (originaltext, tl) ) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE TABLE wt_cache_short ( id INT AUTO_INCREMENT NOT NULL PRIMARY KEY, tl VARCHAR(10), originaltext VARCHAR(50), translated VARCHAR(255), INDEX (originaltext, tl) ) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_general_ci; |
#285
|
||||
|
||||
Quote:
|
#286
|
|||
|
|||
Quote:
I'm running the full instructions ...... just that when I send Code: mida that error I cancel the DB and tried to do anything but I do not know how to do |
#287
|
||||
|
||||
You aready have DB set. So what is the problem?
|
#288
|
||||
|
||||
Quote:
|
#289
|
|||
|
|||
Hello.
Thanks for your hack. This is my first trial, but I encount below error. Code:
Fatal error: Call to undefined function: mysql_set_charset() in /home/hosting_users/www/forum/translate.php on line 35 our origin text is mainly Korean other translate to all other languages. Above line 35 is, Code:
//////////////////////////////////////////////////// if ($enablecache) { mysql_connect ($mysqlserver, $dbusername, $dbpassword); mysql_select_db ($dbname); #35: mysql_set_charset('utf8'); } //////////////////////////////////////////////////// PHP Code:
My Server set is,
What it's problem? help me. Thank you. |
#290
|
|||
|
|||
Thanks for the updates
|
#291
|
|||
|
|||
Quote:
I think this would be a very valuable feature |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|