Hi Tripp, all!

Tripp Bishop wrote:
[[...]]

Why would adding extra fields to the query slow the
query down so much? In either case it looks like it's
using the same index.

If a query is to return only fields contained in the index, it can be executed as an "index-only" query, and the "true" data need not be accessed.

The moment you ask for a field not contained in the index, for each index entry matching the search condition, the base data need to be accessed to get that field.

This may be very significant additional costs.

HTH,
Joerg


PS:
In my reader, it looked like your original question hijacked another thread: "Question regarding running 'mysql' from a bash script".
:-(

--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to