RETURN_RANGE hint

Today I have noticed a new default behaviour of RETURN_RANGE hint:

groovy:000> ?,c,select r_object_id from dm_sysobject  enable(RETURN_RANGE 1 10 'r_object_id ASC')
USER ATTRIBUTES


SYSTEM ATTRIBUTES

  r_object_id                     : 08024be98000013c
....

groovy:000> ?,c,exec get_last_sql
USER ATTRIBUTES

  result                          : 
select all dm_sysobject.r_object_id from dm_sysobject_sp  dm_sysobject where 
  (dm_sysobject.i_has_folder = 1 and dm_sysobject.i_is_deleted = 0) order by r_object_id ASC 300 commit

Previously Content Server was translating DQL query to SQL, but now it filters out redundant records on CS, not database, side. I believe the change in default behaviour is related to consistency between repeating attributes and amount of returned “records”, but let return to 2014:

RETURN_RANGE DQL queries – very limited syntax due to transformation to SQL. Why do not limit returned results at content server level?

🙂