phpBB MySQL Optimized search.php

Conventional discussion only. No politics, religion and other topics that might cause conflicts.
Strictly appropriate discussions only, meaning spammers and trolls will be banned on first offense.

Moderator: Moderators

phpBB MySQL Optimized search.php

Postby pentapenguin on Thu Jan 13, 2005 5:03 pm

Sorry I've been gone lately--been crazy! :x
Anyways, I had an idea (scary huh? :lol: )
Since how to restore your database if it's large is a very popular topic on phpBB and since 90% or more people use MySQL, would there be any problem that I don't see with using MySQL's LIKE clause on searches instead of using the indexes?
50% or more of the database is just the search indexes so a lot of time in restoring could be saved if they weren't used.
Now I know using LIKE on big forums would cause a slow down, but wouldn't it work okay for small to medium sized forums?
I guess by not updating the search tables when posting/editing would speed up the server a bit too.

Hope this makes a little sense! ;)
Thanks for any insight!
User avatar
pentapenguin
Moderator
Moderator
 
Posts: 1466
Joined: Tue Sep 14, 2004 4:15 pm
Location: Georgia, USA

Postby PostBot on Thu Jan 13, 2005 6:56 pm

I think it is a bad idea. For example, this forum is medium sized and size of posts database is 10 Mb. Hovewer, server is quite heavily loaded (because of hundreds of other websites hosted on same server), so searching 10 Mb for match will cause huge delay.

If you want to speed up then limit indexing. For example, index only first 100 words from every post and index only first 5 posts in every thread - usually that's where all main information is posted so everything else doesn't need indexing.
Do NOT pm me, I don't visit this forum anymore, don't own it, don't provide any support and don't moderate.
User avatar
PostBot
Moderator
Moderator
 
Posts: 10659
Joined: Sat Aug 02, 2003 3:52 pm
Location: Mars

Postby Julz on Thu Jan 13, 2005 11:24 pm

No, I agree with CyberAlien. It would be easier just to limit the search output. What about if you had phpBB trying to do that? It would take about a minute just to find a post.
Julz
Registered User
Registered User
 
Posts: 618
Joined: Tue Dec 07, 2004 9:22 am
Location: Hobart, Tasmania

Postby PostBot on Fri Jan 14, 2005 12:22 am

For your information: about an hour ago psoTFX added full text search function to phpBB 2.2, so if you are using new mySQL versions then you can use fulltext search that should work very fast.
Do NOT pm me, I don't visit this forum anymore, don't own it, don't provide any support and don't moderate.
User avatar
PostBot
Moderator
Moderator
 
Posts: 10659
Joined: Sat Aug 02, 2003 3:52 pm
Location: Mars

Postby Julz on Fri Jan 14, 2005 12:53 am

Cool, thanks Vjacheslav.
Julz
Registered User
Registered User
 
Posts: 618
Joined: Tue Dec 07, 2004 9:22 am
Location: Hobart, Tasmania

Postby pentapenguin on Sat Jan 15, 2005 5:28 am

Well, I guess the golden rule of programming applies here: If it ain't broken, don't fix it. ;)
User avatar
pentapenguin
Moderator
Moderator
 
Posts: 1466
Joined: Tue Sep 14, 2004 4:15 pm
Location: Georgia, USA

Postby Julz on Sat Jan 15, 2005 7:38 am

Never heard truer.
Julz
Registered User
Registered User
 
Posts: 618
Joined: Tue Dec 07, 2004 9:22 am
Location: Hobart, Tasmania


Return to Regular Discussion

Who is online

Users browsing this forum: No registered users and 0 guests