Re: Optimizing range search with two-table ORDER BY

2006-05-12 Thread sheeri kritzer
Hi Jesse, Have you tried the following: 1) ordering by only part.d and seeing how long the query takes 2) putting an index on (part.d, cwGroup.stripped_cw) and seeing how long the query takes. 1 will help pinpoint the problem, and 2 might actually help. -Sheeri SELECT part.d,

Optimizing range search with two-table ORDER BY

2006-05-08 Thread Jesse Sheidlower
Is there any way to optimize a range query that includes an ORDER BY with keys from two different tables? I'm running MySQL 4.1.18 on FreeBSD. I've been struggling with some queries that are _incredibly_ slow--from 1-5 minutes on slowish but decent hardware. When I try versions without the ORDER