Many thanks Alec. I need to wait a couple of hours before I can block access
to the DB by messing with the indexes, but I will try out what you suggest.
What you say makes sense as probably over 99% of the values in that first
col will be 'y'. I will post my progress. I am also looking into recoding
the where clause as inner joins ... I didn;t expect this to make any
difference as I would have thought mysql figures this out but it _seems_ to
cut down the query time to 2-3 secs without using any extra index columns
... bizarre. But I'll take what I can get.

Answering questions definitely gets answers ... there is a pithy aphorism in
there somewhere ... :)

Jim

> > PS I am answering loads of questions in the hope that the power of my
> Karma
> > will force someone to answer mine ... (join problem:indexed columns
being
> > ignored)
>
> My first reaction would be to turn your index round. Something with
> settings of "y" and "n" is going to make a rotten index, especially as the
> first part. It is possible that MySQL will look at that part of it, decide
> that this is a lousy index, and ditch it. If you put the diffuse part of
> the index first, then the boolean, it might sort better. I don't think you
> have to change your query - I think MySQL is savvy enough to commute over
> the AND.


(This email has been scanned for viruses by www.emf-systems.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