Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 25, 2012, 09:46:32 AM

Pages: [1]   Go Down
  Print  
Author Topic: HELP: My new VPS 10 times slower than Shared Plan?  (Read 876 times)
testall
Intergalactic Cowboy
*****
Offline Offline

Posts: 70


« on: May 30, 2007, 08:50:43 AM »

my newly installed VPS website is much slower than orginal shared plan, I found out the difference is caused by one line of mysql query:

The vps and shared plan have exactly same set of data/script, newly installed VPS has no user on it, shared plan has some user.

The sql query takes time:
Shared Plan: 0.14 to 0.2 seconds
VPS ( no user at all): 1.8 Seconds

this is the line sql:
SELECT DISTINCT t.topic_last_post_time, t.topic_id FROM phpbb_posts p, phpbb_topics t WHERE p.post_time > 316626304 AND t.topic_moved_id = 0 AND p.topic_id = t.topic_id AND (p.post_approved = 1 OR p.forum_id NOT IN (1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 27, 28, 30, 31, 32, 33, 34)) AND p.forum_id <> 12 ORDER BY t.topic_last_post_time DESC


I have tried tuning the my.cnf in different ways, no much difference.
 Grr..!!
Logged
testall
Intergalactic Cowboy
*****
Offline Offline

Posts: 70


« Reply #1 on: May 30, 2007, 03:38:49 PM »

I found out it could be the slow performance of mysql version 5.0.27, probably i will have to  roll back to 4.x Doh
Logged
perestrelka
Administrator
Master Jedi
*****
Offline Offline

Posts: 1395



« Reply #2 on: May 30, 2007, 09:33:29 PM »


Please let us know about how performance changed with MySQL 4 after downgrade.
Logged

Kind Regards,
Vlad Artamonov
testall
Intergalactic Cowboy
*****
Offline Offline

Posts: 70


« Reply #3 on: June 05, 2007, 05:44:59 AM »

since mysql 4 + php 5 needs spacial installation, i decided to go with mysql 5 + php 5.
i have to modify some scripts, specally thoses ORDER BY sql, now the speed is ok.
Logged
perestrelka
Administrator
Master Jedi
*****
Offline Offline

Posts: 1395



« Reply #4 on: June 06, 2007, 12:42:27 AM »

Hi,

I am glad to hear you managed to find a solution to performance issues without downgrading.

Logged

Kind Regards,
Vlad Artamonov
testall
Intergalactic Cowboy
*****
Offline Offline

Posts: 70


« Reply #5 on: June 06, 2007, 06:48:55 AM »

Hi,

I am glad to hear you managed to find a solution to performance issues without downgrading.



The tricky part is to use " Force KEY( order_by_key)" if the key used in WHERE is different than the key used in ORDER BY.

wish other people can benefit my discover.

 Happy Happy Joy Joy
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: