Sql query vs Ruby methods

Really both quieries look crazy, and will perform poorly on any
realistic dataset.

I guess Person is a subclass of a User, so if you are using STI just
try:

User.all(:conditions => "type !=
'Person'", :limit=>5, :order=>'created_at DESC')

Dmitry

Dmitry Sokurenko wrote:

Really both quieries look crazy, and will perform poorly on any
realistic dataset.

I guess Person is a subclass of a User, so if you are using STI just
try:

User.all(:conditions => "type !=
'Person'", :limit=>5, :order=>'created_at DESC')

Dmitry

Thanks