26

Re: Archive

Rickard wrote:

lebel: One thing you could try is to convert the online table to the table type MyISAM. You can do this through e.g. phpMyAdmin. I'm not sure it will help, but give it a go.

Nice forum BTW. It should be on PunBBig smile

ok thx i will try wink

27 (edited by lebel 2004-12-26 10:27)

Re: Archive

Don't work

One of these request too expensive for my server (when there s ore than 15550 registered):
SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.status, u.registered, u.admin_note, p.id, p.poster, p.poster_id, p.poster_ip, p.poster_email, p.message, p.smilies, p.posted, p.edited, p.edited_by FROM t_posts AS p INNER JOIN t_users AS u ON u.id=p.poster_id
WHERE p.topic_id=2044 ORDER BY p.id LIMIT 100,20;


With a IN ?????????
SELECT t.id AS tid, t.poster, t.subject, t.last_post, t.last_post_id, t.last_poster, t.num_replies, t.forum_id FROM t_posts AS p INNER JOIN t_topics AS t ON p.topic_id=t.id WHERE t.id IN(2,3,4,5,6,7,8,11,12,13,14,15,16,18,20,25,29,35,40,51,53,55,56,60,90,95,101,108,110,125,132,149,158,165,176,179,181,233,255,304,325,329,338,402,412,436,468,600,613,618,629,691,697,742,758,769,820,834,875,883,903,918,925,1011,1018,1061,1096,1109,1131,1154,1176,1256,1302,1309,1312,1325,1344,1354,1366,1375,1392,1417,1433,1467,1468,1489,1495,1503,1517,1563,1571,1585,1620,1649,1655,1657,1674,1677,1694,1695,1711,1730,1731) GROUP BY t.id, t.poster, t.subject, t.last_post, t.last_post_id, t.last_poster, t.num_replies, t.forum_id ORDER BY t.last_post DESC LIMIT 0, 15;

Re: Archive

None of those queries should put any noticeable strain on the server. It should definately not crash like you said it did. If your MySQL processes crash, you should upgrade MySQL.

What kind of hardware hosts your forums?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

29

Re: Archive

Celeron 2 GHz
256 Mo RAM - 40 Go IDE
only for one website
PHP Version 4.3.0
Apache Version  Apache/1.3.26 
MySQL 3.23.53a

It's not one request which crash server. It's 50 users who do this request at the same time and crash server

Re: Archive

Upgrading to MySQL 4.0 or even 4.1 will give you a huge performance increase (due to the query cache primarily). I definately recommend you do that.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

31

Re: Archive

I'm always in 3.23.53a
but i put an index to the table POSTS (field "topic_id") and it's better
server don't crash now

Re: Archive

If your MySQL daemon is crashing you should look for a new host. If you're on a virtual host a dedicated server would work much better for you. Plus if you can attain a server with a 64-bit processor, MySQL will speed up substantially as it uses many 64-bit calculations. When in 32-bit it is forced to use three calculations per 64-bit calculation... Long story.

Re: Archive

lebel: Your PunBB should have had an index on the topic_id column in the posts table already. I'm beginning to think there's something wrong with PunBB on MySQL 3. Especially considering this topic.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Archive

Additionally, 3.23+ is deprecated. The only reason it exists on certain distros has to do with licensing issues. As much as I've researched the problem I have concluded their points are moot.