Adam Powell wrote:
>
> Hi there... I was just wondering about the database processing overhead in
> each of the following situations. Basically I have a database of banners
> (for an ad rotation script) that I want to SELECT from. The load on the
> database server got to high when I selected from ALL of them, so I split
> them up into 4 sections and in 4 individual scripts did :
>
> SELECT * FROM banners WHERE section=1
> SELECT * FROM banners WHERE section=2
> SELECT * FROM banners WHERE section=3
> SELECT * FROM banners WHERE section=4
>
> This helped get the load back down again. However now I have come to a
> point where I have to actually revert back to my old method as there are a
> few more things I wish to do, targeting functions that must include the
> whole range of banners.
>
> Could anybody give me some pointers, and some tips in table design that will
> speed up SELECT * FROM banners.... are there any column types to avoid? We
> need to do about 200 lookups a second, and there are 160 rows in the
> table...
>
> Adam
>
Post the output of
DESCRIBE banners
to help us have a more meaningful discussion.
--
Sasha Pachev
http://www.sashanet.com