* Joao A. Marques
> Letīs supose that we have a table with this features :
> - about 70000 records;
> - only a primary index;
> - about 30 fields;
> - 50% of SELECTS  and 50% of INSERTS/UPDATES. The SELECTS
> typically uses about 3 or 4 fields in the WHERE clause.

None of them beeing the primary key, I suppose? When it is, you should have
no problem.

> Creating indexes, one for each field used on SELECTS, will speed
> up things ?

Yes. But you should be aware that mysql only use one index at the time, and
that one index can (and sometimes should) span multiple fields.

<URL: http://www.mysql.com/doc/M/y/MySQL_indexes.html >

> Or the overhead of updating the indexes on INSERTS/UPDATES does not
> compensate ?

There is a overhead, and you should create as few indexes as possible. This
is extra important when you have a lot of updates. But the overhead of doing
full scans of the table all the time is probably heavier. You should do some
experimenting. Indexes are transparent to your applications, testing
different combinations is relatively easy. :)

> MySQL v 3.22.32

You should upgrade, if you can... :)

--
Roger


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to