Hi, I have a website that is basically a picture gallery site.
Now, users must log in etc, and there are a few other background things that go on while the user is there, relevent to the current user that uses the site.
On average, there will be approximately 30 queries per page load, most of them will have less than 3 results, so they aren't very large.
However, when i query from the actual picture list (one large table with picture name, path, size, dimensions etc) which has over 70,000 rows, each query uses over 2 percent of my CPU, which is a P3-1000.
I use FreeBSD and use 'top' to view the CPU usage. If I reload a page that queries from the picture table I can get it up to over 70 percent and more CPU usage within less than a minute.
I have a Dual P3-1000 box and this is ridiculous cpu usage. I was wondering if anyojne knew of a way for me to make the queries more efficient or simply stop the cpu from being used to heavily.
The table has an index, and none of the queries will call up more than 1000 results. Are there dfferent kinds of indexes? Should I reduce the amount of columns? (find out width and height dynamically, etc)
Thanks in advance!
Decius.