note
sgifford
<p>Thanks, it was <code>$sth->{"mysql_use_result"} = 1;</code> that I needed!
<p>The right indexes are all in place (and <tt>EXPLAIN SELECT</tt> agrees), there are just a huge number of rows in the result set.
<p>Now here's the other weird thing, which doesn't matter for my real project but is still unusual. When I make this change, the test program I posted above works better, but now it hangs for a long time during the <code>finish</code>. That surprises me; I would expect it to cancel the query and return immediately. Anybody know what's going on?
309654
309672