MySQL - index optimisation - Any good resources?

MySQL - index optimisation - Any good resources?

am 13.06.2007 15:27:08 von cluthz

I have recently had some corruption in my database of my php/ mysql
application. I have made some changed to my application that meant I did a
lot more larger queries.

I'm thinking I can write better SQL code to query my database and also make
sure my index's are in the right places.

Generally I put an index whenever I have a foreign key. But I want to be
able to learn if this is the best thing to do and how to use them better.

I have been unable to find any good resources on indexes that teach me
better. Even the MySQL book I have only seems to touch on them really.

Any help?

Thanks

Re: MySQL - index optimisation - Any good resources?

am 13.06.2007 16:03:50 von iktorn

cluthz napisa³(a):
> I have recently had some corruption in my database of my php/ mysql
> application. I have made some changed to my application that meant I did a
> lot more larger queries.
>
> I'm thinking I can write better SQL code to query my database and also make
> sure my index's are in the right places.
>
> Generally I put an index whenever I have a foreign key. But I want to be
> able to learn if this is the best thing to do and how to use them better.
>
> I have been unable to find any good resources on indexes that teach me
> better. Even the MySQL book I have only seems to touch on them really.
>
> Any help?
>

You may have a look at "High Performance MySQL" book
(http://www.oreilly.com/catalog/hpmysql/)

It's quite old, but I've read it and must say that in my opinion this
book is very good.

--
Wiktor Walc
http://phpfreelancer.net