optimize objects_by_session_id