![]() | |
| |||
| Hello I run a couple of websites which do complex "like '%word%'" SQL queries (such as this: Jobseeker - Jobs ) Some of my queries are a bit slow. My server is a fairly basic celeron (can't remember the exact spec, but I think it's 1.8 Ghz with 512 MB ram.) If I were to upgrade to say... a Xeon 2.8 Ghz with 1 Gig ram, would my SQL queries run much faster? Or is there a smarter way to speed up my queries? Any advice appreciated. Thanks! |
| ||||
| Are you running the latest version of MySQL? Have you optimised the setup? Are you caching enough? 512MB of RAM doesn't sound like enough anyway ....
__________________ Hosting & Domains|Plesk Vps Hosting|Blog Tips|Films.ie|Gadgets|Monetisation Tips|Movie Chat Energise your forum! Click here for info |
| |||
| Hi Blacknight Thanks for the reply. To answer your questions - Are you running the latest version of MySQL? MySQL version 4.0.27-standard. Pretty old I guess! Have you optimised the setup? No. I'm just running the queries. I could defo improve in this area... Are you caching enough? I don't think I'm caching at all... Hmmm. Any advice? Thanks |
| ||||
| A newer version of mysql might help You could also look into some of the caching / optimisation tips that you'll find online eg. caching the php could help with the overall performance If you have a look at some of the MySQL blogs you should get some suggestions, though I'm sure someone on here will have suggestions
__________________ Hosting & Domains|Plesk Vps Hosting|Blog Tips|Films.ie|Gadgets|Monetisation Tips|Movie Chat Energise your forum! Click here for info |
| ||||
| Here's a few links: MySQL Optimization Michele Neylon :: Pensieri Mobile Edition - there's some useful stuff in the comments MySQL's Query Cache
__________________ Hosting & Domains|Plesk Vps Hosting|Blog Tips|Films.ie|Gadgets|Monetisation Tips|Movie Chat Energise your forum! Click here for info |
| ||||
|
__________________ Hosting & Domains|Plesk Vps Hosting|Blog Tips|Films.ie|Gadgets|Monetisation Tips|Movie Chat Energise your forum! Click here for info |
| |||
| You'll know if you need more RAM by looking at your own server statistics. Are you swapping to disk at all? Basic indexing can help hugely too - with MySQL you can log all your slow queries (say ones that took longer than 2 seconds to run) to a file and then use EXPLAIN to see how they are running. So imagine your query is something like Code: SELECT * FROM jobs WHERE Location like '%word%'; Code: EXPLAIN SELECT * FROM jobs WHERE Location like '%word%'; Lastly, if you are looking at full text searching mysql, its nasty. Take a look at Sphinx Search - its pretty good if you put a bit of work into it. |
| Thread Tools | |
| Display Modes | |
|
|
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Script Installation, Server Administration | bizhat | Marketplace Offers | 2 | 10-03-2008 11:29 AM |