|
Posted by Chung Leong on 12/18/41 11:49
TristaSD wrote:
> Hi,
>
> I wrote a php+MySQL-based reservations system for a local restaurant.
> MySQL is running on AMD Athlon 3000+ 2GHz with 1.5Gb of RAM. The
> system is accessed through Intranet by 4-5 machines.
>
> The main reservations table weighs only 40k with around 150 entries,
> but I'm getting weird lags in the middle of the pages - half of the
> table loads ... LAG! ... then the other half loads. This is especially
> annoying considering the table will contain around 3,000 - 5,000
> entries per year, entries older than 2 years will be removed.
>
> The lags persist on MySQL server (locally), so it's not a network
> issue. The lags are espeically bad when I do a query like "SELECT
> name, phone, notes FROM reservations WHERE date > %today%" - it
> literally takes 5-6 seconds to pull one row.
>
> I don't use "SELECT ALL" queries, my tables are optimized, etc.
>
> Help!
Sounds like you're running into a serious case of lock contention.
Here's a good article on the topic:
http://www.devshed.com/c/a/MySQL/MySQL-Optimization-part-2/
Navigation:
[Reply to this message]
|