Slow Mysql queries

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-02-2008, 02:23 PM
Donor
Pligg Version: RC3
Pligg Template: Wistie
 
Join Date: Dec 2007
Posts: 28
Hi

I m Checking my site's performance and I found log of Slow Mysql queries I posting them here and want to know how many of them are not must have query and can be removed to speed up my pligg site

mysql_slow_queries

INSERT INTO pligg_pageviews (pv_type, pv_page_id, pv_datetime, pv_user_id, pv_user_ip) VALUES ('story', 4434, FROM_UNIXTIME(1215015448), 0, '66.249.73.146')


select *, count(*) as count from pligg_links, pligg_categories where category_lang='en' and category_id=link_category group by link_category ORDER BY category_name ASC


select tag_words, count(*) as count FROM pligg_tags, pligg_links WHERE tag_lang='en' and link_id = tag_link_id and link_status!='discard' GROUP BY tag_words order by count desc limit 30


so many of them but those are most visible in my log

Thanks for any help or suggestion
Reply With Quote
  #2 (permalink)  
Old 07-02-2008, 02:33 PM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Social Pro Kit
 
Join Date: Jun 2006
Posts: 5,448
Your profile says you are using Pligg 9.8.1
I would suggest that you update to the latest version. Pligg 9.9.0
A lot of queries have been removed and or condensed in the latest version which will give you a noticeable speed increase.
Reply With Quote
  #3 (permalink)  
Old 07-04-2008, 09:13 AM
Donor
Pligg Version: RC3
Pligg Template: Wistie
 
Join Date: Dec 2007
Posts: 28
Quote:
Originally Posted by chuckroast View Post
Your profile says you are using Pligg 9.8.1
I would suggest that you update to the latest version. Pligg 9.9.0
A lot of queries have been removed and or condensed in the latest version which will give you a noticeable speed increase.

Thanks but

I m using 9.9.0

and getting those problems
Reply With Quote
  #4 (permalink)  
Old 01-28-2009, 05:41 PM
New Pligger
Pligg Version: 1RC1b
 
Join Date: Jan 2009
Location: Boise, Idaho
Posts: 1
Any updates to this?

I, too, am getting painfully slow queries.

Code:
# Query_time: 8  Lock_time: 0  Rows_sent: 1  Rows_examined: 887419
select count(*) as words FROM pligg_tags, pligg_links WHERE tag_lang='en' and link_id = tag_link_id and  link_status!='discard'  GROUP BY tag_words order by words desc limit 1;

# Query_time: 8  Lock_time: 0  Rows_sent: 5  Rows_examined: 887423
select tag_words, count(*) as count FROM pligg_tags, pligg_links WHERE tag_lang='en' and link_id = tag_link_id and  link_status!='discard'  GROUP BY tag_words order by count desc limit 5;
Reply With Quote
  #5 (permalink)  
Old 04-11-2009, 10:28 PM
Casual Pligger
Pligg Version: 9.9.5
 
Join Date: Nov 2008
Posts: 33
+1 to this im using pligg9.9.5 and im geting those errors
Reply With Quote
  #6 (permalink)  
Old 04-11-2009, 11:59 PM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Social Pro Kit
 
Join Date: Jun 2006
Posts: 5,448
Quote:
Originally Posted by reklama View Post
+1 to this im using pligg9.9.5 and im geting those errors
Chances are you are getting these error due to your web host.
We don't have a lot of information to go on.
Reply With Quote
  #7 (permalink)  
Old 04-12-2009, 12:09 AM
Casual Pligger
Pligg Version: 9.9.5
 
Join Date: Nov 2008
Posts: 33
It might be the server.Thats what hostgator admin told me.
"Connections to your database are frequently being killed by the server. Our shared hosting servers have a policy of 15 seconds maximum per database connection, and a process to enforce this policy runs every 60 seconds. That means no connection can last longer than 60 seconds, and most will be killed before then.

As for why your database connections are staying open for so long, check to make sure you don't have "persistent" database connections enabled in your web applications. Also see if there are any updates or plugins for Pligg or your other web applications that reduce the need for complex database queries which may be taking a long time. You may also want to contact technical support or visit any support forums offered by the companies of your web applications, to see how database usage can be improved."

I have two pligg 9.9.5 sites in the same server and only one is giving me mysql problems. Everything is fast when you are a visitor but when you log in ( admin or user) it gets slow.
Reply With Quote
  #8 (permalink)  
Old 04-12-2009, 12:21 AM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Social Pro Kit
 
Join Date: Jun 2006
Posts: 5,448
reklama
I mean no disrespect with my reply. It's good that you came here to alert us of your situation We are aware with some harsh queries with Pligg Beta 9.9.5 and some shared hosts. Have you tried to update to Pligg 1.0?
We've really done a lot of work with the new version.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Warning: Error establishing mySQL database connection. - Errors on all pages - HELP! comptalk Questions and Comments 3 04-21-2009 12:44 PM
reducing mysql queries on main page nitiniitk Questions and Comments 0 09-24-2008 08:29 PM
mysql has gone away error php warning argh2xxx Questions and Comments 5 08-13-2008 03:45 AM
Comments, MYSQL Queries Simon Questions and Comments 7 05-06-2007 10:10 AM
10 tips for optimizing mysql queries en3r0 Questions and Comments 3 04-10-2007 12:33 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development