I don't know Ruby, but does Benchmark.ms clear buffers and flush cache? If no, the second query has a large advantage, sometimes you can get similar performance improvements without changing query...
The difference is lesser, but still fairly significant (30x).
Thanks for pointing this out.