Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-30-2008, 11:42 AM
clems365's Avatar
Casual Pligger
Pligg Version: 9.8.2
Pligg Template: CMS Theme
 
Join Date: May 2007
Location: santiago chile
Posts: 60
Thanks: 5
Thanked 9 Times in 6 Posts
Optimize tags table in MySql

Hi all

To make pligg quicker it's important to optimize the tags table, so I think one of the best way is delete the "unique" tag.

You can see with this instruction in your database haow many unique tag to you have

In Mysql run this:

Code:
SELECT COUNT(*) AS nb_doubles, tag_words
FROM   pligg_tags
GROUP  BY tag_words
HAVING nb_doubles < 2

My trouble is I don't know how to delete those tags....If somebody has an idea it will be great.

Thanks for your help

Best regards

Clément
__________________
my pligg site: http://www.web2.cl
Reply With Quote
  #2 (permalink)  
Old 05-30-2008, 01:16 PM
redwine's Avatar
Pligg Donor
Pligg Version: 9.8
Pligg Template: custom templat
 
Join Date: Jul 2007
Location: Canada
Posts: 216
Thanks: 20
Thanked 102 Times in 65 Posts
Tags table

The term "unique" does not apply in this case. I believe what you meant is "having a count of 1".

Assuming you have these tags:
3 love
3 technical
2 philosophy
2 arts
1 peace
1 war
1 history

In total, you have 13 tags and 7 unique tags.

Now, according to your suggestion, you want to delete every tag that appears only once. My question is how these tags are going to grow and appear in the cloud if you keep deleting the tags with a count of 1?

Please provide more details to see how we can help.
Reply With Quote
  #3 (permalink)  
Old 05-30-2008, 01:57 PM
clems365's Avatar
Casual Pligger
Pligg Version: 9.8.2
Pligg Template: CMS Theme
 
Join Date: May 2007
Location: santiago chile
Posts: 60
Thanks: 5
Thanked 9 Times in 6 Posts
Hi

I have more 50.000 tags....So I would like every week for example make an optimize, so yes I would like to delete the unique tags beacause next a week thoses tags aren't relevant and just take a lot of space and ressouce.

thanks for your help

clement
__________________
my pligg site: http://www.web2.cl
Reply With Quote
  #4 (permalink)  
Old 05-30-2008, 04:47 PM
redwine's Avatar
Pligg Donor
Pligg Version: 9.8
Pligg Template: custom templat
 
Join Date: Jul 2007
Location: Canada
Posts: 216
Thanks: 20
Thanked 102 Times in 65 Posts
Optimize tags table in MySql

Quote:
Originally Posted by clems365 View Post
Hi

I have more 50.000 tags....So I would like every week for example make an optimize, so yes I would like to delete the unique tags beacause next a week thoses tags aren't relevant and just take a lot of space and ressouce.

thanks for your help

clement
It is a bit complex. First, to delete them (the tags with a count of 1), you have to run the query you posted and then from the result set, you only insert into a new temporary table all the records with a count > 1, then you have to delete all records from the initial table_tags and insert the records from the temp table into it.

I can see at least 2 problems here:
  1. What about the tag_link_id field, and how are you going to allocate the tags to it?
  2. The tags displayed within the story (summary and full) are taken from the Links table from the link_tags field. Any deleted tag from the tags table will still be displayed. What if a user clicks on it?
Reply With Quote
  #5 (permalink)  
Old 06-02-2008, 04:23 AM
Pligg Donor
Pligg Version: 9
Pligg Template: expertvision
 
Join Date: Mar 2008
Posts: 58
Thanks: 11
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by clems365 View Post
Hi all

Code:
SELECT COUNT(*) AS nb_doubles, tag_words
FROM   pligg_tags
GROUP  BY tag_words
HAVING nb_doubles < 2
Clemente, this is the only thing that you have done for tags? I've seen your site and seems that work's fine without the problems of the other replys.
Thank's
Francesco
__________________
---------------------------------------------------------------------------------------
Free News - Video Music - Gossip News - Viaggi e Vacanze - Cani - Gatti - Travel Rss
Reply With Quote
  #6 (permalink)  
Old 06-02-2008, 07:43 AM
clems365's Avatar
Casual Pligger
Pligg Version: 9.8.2
Pligg Template: CMS Theme
 
Join Date: May 2007
Location: santiago chile
Posts: 60
Thanks: 5
Thanked 9 Times in 6 Posts
Hi Francesco

Without the tags include my pligg site run perfectly, the trouble is the tags include, it's a big query for the database, so it's very important to optimize this table.

For my part I believe that important to delete the old unique tags, this will improve the speed of pligg
__________________
my pligg site: http://www.web2.cl
Reply With Quote
  #7 (permalink)  
Old 06-02-2008, 12:37 PM
Pligg Donor
Pligg Version: 9
Pligg Template: expertvision
 
Join Date: Mar 2008
Posts: 58
Thanks: 11
Thanked 0 Times in 0 Posts
I try.
then I would like to delete specific tag (that I can put in a txt file). I have asked in forum but nobody answer me.
You now if is possible to delete specific tags?
__________________
---------------------------------------------------------------------------------------
Free News - Video Music - Gossip News - Viaggi e Vacanze - Cani - Gatti - Travel Rss
Reply With Quote
  #8 (permalink)  
Old 06-02-2008, 05:22 PM
clems365's Avatar
Casual Pligger
Pligg Version: 9.8.2
Pligg Template: CMS Theme
 
Join Date: May 2007
Location: santiago chile
Posts: 60
Thanks: 5
Thanked 9 Times in 6 Posts
In PhpMyAdmin, selec the "pligg_tags", next on the top page, select "search", next on the bottom there is "tags_word" ... "like" here put your tag for exemple "le" and next click on execute and you will have all the "le" tags words

A leat select all and delete

That all

Regards

Clément
__________________
my pligg site: http://www.web2.cl
Reply With Quote
The Following User Says Thank You to clems365 For This Useful Post:
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
pligg tags table performance eben General Help 0 08-31-2008 06:37 PM
Tags not cloud in Pligg v9.9 bhatiacane Bug Report 4 05-03-2008 02:16 AM
installed successfully but one table is not exist oodbqpoo Installation and Upgrade Help 2 03-16-2007 02:22 PM
"pligg_pageviews" MySQL table pligger2 General Help 2 02-27-2007 12:02 PM
Upgrading problem GurillaNET Installation and Upgrade Help 4 01-19-2007 10:56 AM


Search Engine Friendly URLs by vBSEO 3.2.0