On Tue, May 07, 2002 at 01:10:46PM -0700, David McInnis wrote:
>
> I would suggest doing "member = 43 and mh.date > ml.date" since
> there could potentially be more records that meet the second
> criteria. I always try to optimize my queries to narrow my
> recordset as small as possible before I apply any other criteria.
That's good for human readability, but a good optimizer shouldn't
care.
> That said, MySQL may do this sort of optimization internally. (I
> would be curious to know from more seasoned MySQL gurus if this is
> the case).
It is the case. Next time you're messing with one of your queries,
run it through "EXPLAIN <query>" and see what is says. Then change
the order of stuff in the WHERE clause and try again. You should see
the same output. If you don't, report it as a bug. :-)
Jeremy
--
Jeremy D. Zawodny, <jzawodn@stripped>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936
MySQL 3.23.47-max: up 89 days, processed 2,319,227,600 queries (299/sec. avg)