View Single Post

   
  #7 (permalink)  
Old 05-05-2008, 05:51 AM
weheh
 
Posts: n/a
Default Re: Need help performance tuning mysql db

Hi Jerry,

Thanks for your rapid response. Much appreciated. I've read the tuning
manual at this point and it is full of good suggestions. I've started by
tinkering with my swap space, but haven't gotten any positive results, yet.
My server has 4GB of memory but only 1GB is getting used, max.

A few questions:

- I find that my cgi-bin script that does a database access refreshes my
browser in a herky-jerky fashion. I'll get a bunch of data. Then a long
pause. Then a bunch of data. Then wait again. Etc. What could be causing
that?

- My DB tables are all built using CREATE TABLE. Primary tables have keys.
There are some many to many tables that have no keys. For instance: user is
member of group that has acess to record of another table that can belong to
multiple groups. I don't really understand what MYISAM and INNODB are and
what they can do for me. Do I need to understand that to tune performance?
My queries seem straightforward and are all done with LEFT JOINs. Nothing
too fancy.

- Can EXPLAIN be run from within a cgi-bin script? I must learn this
capability.

Sorry for the top-post.

R

> Richard,
>
> The MySQL manual has a lot of good information on tuning.
>
> But Michael gave you the most important tip. Before you do ANYTHING ELSE,
> run EXPLAIN on each of your queries. Look at the output and find those
> which are doing full table scans.
>
> You can't specify how many queries can be run simultaneously, but you can
> specify the number of connections which can be active concurrently in your
> my.ini file.
>
> But I highly doubt that's your problem. Most likely your problem is
> inefficient database design and/or inefficient queries.
>
> And no, MySQL does not lock tables for SELECT statements. What gets
> locked when you update the database depends on the request and engine
> being used.
>
> P.S. Please don't top post. Thanks.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex@attglobal.net
> ==================
>



Reply With Quote