Wednesday, June 30, 2010

MySql inconsistency when using Group By and Order By

I have a Ruby on Rails application where my development environment MySQL version is...

Server version: 5.0.45 MySQL Community Server (GPL)

And the production server (at Engine Yard) is...

Server version: 5.0.51-log Gentoo Linux mysql-community-5.0.51

This SQL satement:

SELECT id,name FROM properties GROUP BY id ORDER BY name DESC LIMIT 10;

Is sorted in Development, but not in Production (in production the results are sorted by ID)

No comments:

Post a Comment