Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
var rec = new GlideRecord('sys_user');
rec.addQuery('active',true);
rec.addQuery('locked_out',true);
rec.query();
var counter=0;
while (rec.next()){
  counter++;
  rec.locked_out = false;
  rec.update();
}
gs.print("counter is: " + counter);

Ran this on Aug. 20, 2013

got these results:

Code Block

[0:00:00.037] Compacting large row block
Time: 0:00:00.189 id: yale_1[glide.11] for: SELECT sys_user0.`sys_id` FROM sys_user sys_user0  WHERE sys_user0.`active` = 1 AND sys_user0.`locked_out` = 1
[0:00:00.006] Compacting large row block
[0:00:00.005] Expanding large row block
Time: 0:00:00.850 id: yale_1[glide.18] for: UPDATE sys_user  SET `sys_updated_by` = 'db692-admin', `locked_out` = 0, `sys_updated_on` = '2013-08-20 17:59:46', `sys_mod_count` = 4 WHERE sys_user.`sys_id` = 'b43c8cb201d0ac0094adf4b82250a652'
Time: 0:00:02.019 id: yale_1[glide.1] for: SELECT sys_user0.`phone`, sys_user0.`manager`, sys_user0.`u_graduation_year`, sys_user0.`u_last_rep`, sys_user0.`auditor`, sys_user0.`location`, sys_user0.`u_organization`, sys_user0.`street`, sys_user0.`u_division`, sys_user0.`city`, sys_user0.`vip`, sys_user0.`first_name`, sys_user0.`sys_domain`, sys_user0.`locked_out`, sys_user0.`u_bomgar_name`, sys_user0.`gender`, sys_user0.`sys_mod_count`, sys_user0.`u_dsp_group`, sys_user0.`employee_number`, sys_user0.`calendar_integration`, sys_user0.`middle_name`, sys_user0.`sys_updated_on`, sys_user0.`u_default_group`, sys_user0.`country`, sys_user0.`last_login`, sys_user0.`user_name`, sys_user0.`time_zone`, sys_user0.`failed_attempts`, sys_user0.`email`, sys_user0.`company`, sys_user0.`last_name`, sys_user0.`active`, sys_user0.`user_password`, sys_user0.`introduction`, sys_user0.`edu_status`, sys_user0.`department`, sys_user0.`state`, sys_user0.`password_needs_reset`, sys_user0.`sys_created_on`, sys_user0.`cost_center`, sys_user0.`mobile_phone`, sys_user0.`title`, sys_user0.`ldap_server`, sys_user0.`u_college`, sys_user0.`sys_updated_by`, sys_user0.`name`, sys_user0.`date_format`, sys_user0.`notification`, sys_user0.`last_login_device`, sys_user0.`zip`, sys_user0.`building`, sys_user0.`last_login_time`, sys_user0.`u_service_contract`, sys_user0.`sys_id`, sys_user0.`u_known_as`, sys_user0.`default_perspective`, sys_user0.`last_password`, sys_user0.`photo`, sys_user0.`sys_created_by`, sys_user0.`accumulated_roles`, sys_user0.`schedule`, sys_user0.`u_facit`, sys_user0.`source`, sys_user0.`sys_class_name`, sys_user0.`u_school`, sys_user0.`home_phone`, sys_user0.`time_format`, sys_user0.`preferred_language` FROM sys_user sys_user0  WHERE sys_user0.`sys_id` = '096818360194ac0094adf4b82250a6cc'
Time: 0:00:01.979 id: yale_1[glide.2] for: SELECT sys_user0.`phone`, sys_user0.`manager`, sys_user0.`u_graduation_year`, sys_user0.`u_last_rep`, sys_user0.`auditor`, sys_user0.`location`, sys_user0.`u_organization`, sys_user0.`street`, sys_user0.`u_division`, sys_user0.`city`, sys_user0.`vip`, sys_user0.`first_name`, sys_user0.`sys_domain`, sys_user0.`locked_out`, sys_user0.`u_bomgar_name`, sys_user0.`gender`, sys_user0.`sys_mod_count`, sys_user0.`u_dsp_group`, sys_user0.`employee_number`, sys_user0.`calendar_integration`, sys_user0.`middle_name`, sys_user0.`sys_updated_on`, sys_user0.`u_default_group`, sys_user0.`country`, sys_user0.`last_login`, sys_user0.`user_name`, sys_user0.`time_zone`, sys_user0.`failed_attempts`, sys_user0.`email`, sys_user0.`company`, sys_user0.`last_name`, sys_user0.`active`, sys_user0.`user_password`, sys_user0.`introduction`, sys_user0.`edu_status`, sys_user0.`department`, sys_user0.`state`, sys_user0.`password_needs_reset`, sys_user0.`sys_created_on`, sys_user0.`cost_center`, sys_user0.`mobile_phone`, sys_user0.`title`, sys_user0.`ldap_server`, sys_user0.`u_college`, sys_user0.`sys_updated_by`, sys_user0.`name`, sys_user0.`date_format`, sys_user0.`notification`, sys_user0.`last_login_device`, sys_user0.`zip`, sys_user0.`building`, sys_user0.`last_login_time`, sys_user0.`u_service_contract`, sys_user0.`sys_id`, sys_user0.`u_known_as`, sys_user0.`default_perspective`, sys_user0.`last_password`, sys_user0.`photo`, sys_user0.`sys_created_by`, sys_user0.`accumulated_roles`, sys_user0.`schedule`, sys_user0.`u_facit`, sys_user0.`source`, sys_user0.`sys_class_name`, sys_user0.`u_school`, sys_user0.`home_phone`, sys_user0.`time_format`, sys_user0.`preferred_language` FROM sys_user sys_user0  WHERE sys_user0.`sys_id` = '665418f20154ac0094adf4b82250a680'
Time: 0:00:01.948 id: yale_1[glide.14] for: SELECT sys_user0.`phone`, sys_user0.`manager`, sys_user0.`u_graduation_year`, sys_user0.`u_last_rep`, sys_user0.`auditor`, sys_user0.`location`, sys_user0.`u_organization`, sys_user0.`street`, sys_user0.`u_division`, sys_user0.`city`, sys_user0.`vip`, sys_user0.`first_name`, sys_user0.`sys_domain`, sys_user0.`locked_out`, sys_user0.`u_bomgar_name`, sys_user0.`gender`, sys_user0.`sys_mod_count`, sys_user0.`u_dsp_group`, sys_user0.`employee_number`, sys_user0.`calendar_integration`, sys_user0.`middle_name`, sys_user0.`sys_updated_on`, sys_user0.`u_default_group`, sys_user0.`country`, sys_user0.`last_login`, sys_user0.`user_name`, sys_user0.`time_zone`, sys_user0.`failed_attempts`, sys_user0.`email`, sys_user0.`company`, sys_user0.`last_name`, sys_user0.`active`, sys_user0.`user_password`, sys_user0.`introduction`, sys_user0.`edu_status`, sys_user0.`department`, sys_user0.`state`, sys_user0.`password_needs_reset`, sys_user0.`sys_created_on`, sys_user0.`cost_center`, sys_user0.`mobile_phone`, sys_user0.`title`, sys_user0.`ldap_server`, sys_user0.`u_college`, sys_user0.`sys_updated_by`, sys_user0.`name`, sys_user0.`date_format`, sys_user0.`notification`, sys_user0.`last_login_device`, sys_user0.`zip`, sys_user0.`building`, sys_user0.`last_login_time`, sys_user0.`u_service_contract`, sys_user0.`sys_id`, sys_user0.`u_known_as`, sys_user0.`default_perspective`, sys_user0.`last_password`, sys_user0.`photo`, sys_user0.`sys_created_by`, sys_user0.`accumulated_roles`, sys_user0.`schedule`, sys_user0.`u_facit`, sys_user0.`source`, sys_user0.`sys_class_name`, sys_user0.`u_school`, sys_user0.`home_phone`, sys_user0.`time_format`, sys_user0.`preferred_language` FROM sys_user sys_user0  WHERE sys_user0.`sys_id` = '625790fe0154ac0094adf4b82250a644'
Time: 0:00:02.005 id: yale_1[glide.10] for: UPDATE sys_user  SET `sys_updated_by` = 'db692-admin', `locked_out` = 0, `sys_updated_on` = '2013-08-20 18:00:06', `sys_mod_count` = 4 WHERE sys_user.`sys_id` = '625790fe0154ac0094adf4b82250a644'
Time: 0:00:01.814 id: yale_1[glide.4] for: SELECT sys_user0.`phone`, sys_user0.`manager`, sys_user0.`u_graduation_year`, sys_user0.`u_last_rep`, sys_user0.`auditor`, sys_user0.`location`, sys_user0.`u_organization`, sys_user0.`street`, sys_user0.`u_division`, sys_user0.`city`, sys_user0.`vip`, sys_user0.`first_name`, sys_user0.`sys_domain`, sys_user0.`locked_out`, sys_user0.`u_bomgar_name`, sys_user0.`gender`, sys_user0.`sys_mod_count`, sys_user0.`u_dsp_group`, sys_user0.`employee_number`, sys_user0.`calendar_integration`, sys_user0.`middle_name`, sys_user0.`sys_updated_on`, sys_user0.`u_default_group`, sys_user0.`country`, sys_user0.`last_login`, sys_user0.`user_name`, sys_user0.`time_zone`, sys_user0.`failed_attempts`, sys_user0.`email`, sys_user0.`company`, sys_user0.`last_name`, sys_user0.`active`, sys_user0.`user_password`, sys_user0.`introduction`, sys_user0.`edu_status`, sys_user0.`department`, sys_user0.`state`, sys_user0.`password_needs_reset`, sys_user0.`sys_created_on`, sys_user0.`cost_center`, sys_user0.`mobile_phone`, sys_user0.`title`, sys_user0.`ldap_server`, sys_user0.`u_college`, sys_user0.`sys_updated_by`, sys_user0.`name`, sys_user0.`date_format`, sys_user0.`notification`, sys_user0.`last_login_device`, sys_user0.`zip`, sys_user0.`building`, sys_user0.`last_login_time`, sys_user0.`u_service_contract`, sys_user0.`sys_id`, sys_user0.`u_known_as`, sys_user0.`default_perspective`, sys_user0.`last_password`, sys_user0.`photo`, sys_user0.`sys_created_by`, sys_user0.`accumulated_roles`, sys_user0.`schedule`, sys_user0.`u_facit`, sys_user0.`source`, sys_user0.`sys_class_name`, sys_user0.`u_school`, sys_user0.`home_phone`, sys_user0.`time_format`, sys_user0.`preferred_language` FROM sys_user sys_user0  WHERE sys_user0.`sys_id` = 'be6854f20194ac0094adf4b82250a63d'
Time: 0:00:01.558 id: yale_1[glide.7] for: SELECT sys_user0.`phone`, sys_user0.`manager`, sys_user0.`u_graduation_year`, sys_user0.`u_last_rep`, sys_user0.`auditor`, sys_user0.`location`, sys_user0.`u_organization`, sys_user0.`street`, sys_user0.`u_division`, sys_user0.`city`, sys_user0.`vip`, sys_user0.`first_name`, sys_user0.`sys_domain`, sys_user0.`locked_out`, sys_user0.`u_bomgar_name`, sys_user0.`gender`, sys_user0.`sys_mod_count`, sys_user0.`u_dsp_group`, sys_user0.`employee_number`, sys_user0.`calendar_integration`, sys_user0.`middle_name`, sys_user0.`sys_updated_on`, sys_user0.`u_default_group`, sys_user0.`country`, sys_user0.`last_login`, sys_user0.`user_name`, sys_user0.`time_zone`, sys_user0.`failed_attempts`, sys_user0.`email`, sys_user0.`company`, sys_user0.`last_name`, sys_user0.`active`, sys_user0.`user_password`, sys_user0.`introduction`, sys_user0.`edu_status`, sys_user0.`department`, sys_user0.`state`, sys_user0.`password_needs_reset`, sys_user0.`sys_created_on`, sys_user0.`cost_center`, sys_user0.`mobile_phone`, sys_user0.`title`, sys_user0.`ldap_server`, sys_user0.`u_college`, sys_user0.`sys_updated_by`, sys_user0.`name`, sys_user0.`date_format`, sys_user0.`notification`, sys_user0.`last_login_device`, sys_user0.`zip`, sys_user0.`building`, sys_user0.`last_login_time`, sys_user0.`u_service_contract`, sys_user0.`sys_id`, sys_user0.`u_known_as`, sys_user0.`default_perspective`, sys_user0.`last_password`, sys_user0.`photo`, sys_user0.`sys_created_by`, sys_user0.`accumulated_roles`, sys_user0.`schedule`, sys_user0.`u_facit`, sys_user0.`source`, sys_user0.`sys_class_name`, sys_user0.`u_school`, sys_user0.`home_phone`, sys_user0.`time_format`, sys_user0.`preferred_language` FROM sys_user sys_user0  WHERE sys_user0.`sys_id` = 'ca40d0320114ac0094adf4b82250a67a'
Time: 0:00:00.507 id: yale_1[glide.10] for: UPDATE sys_user  SET `sys_updated_by` = 'db692-admin', `locked_out` = 0, `sys_updated_on` = '2013-08-20 18:00:11', `sys_mod_count` = 59 WHERE sys_user.`sys_id` = 'ca40d0320114ac0094adf4b82250a67a'
Time: 0:00:01.993 id: yale_1[glide.16] for: SELECT sys_user0.`phone`, sys_user0.`manager`, sys_user0.`u_graduation_year`, sys_user0.`u_last_rep`, sys_user0.`auditor`, sys_user0.`location`, sys_user0.`u_organization`, sys_user0.`street`, sys_user0.`u_division`, sys_user0.`city`, sys_user0.`vip`, sys_user0.`first_name`, sys_user0.`sys_domain`, sys_user0.`locked_out`, sys_user0.`u_bomgar_name`, sys_user0.`gender`, sys_user0.`sys_mod_count`, sys_user0.`u_dsp_group`, sys_user0.`employee_number`, sys_user0.`calendar_integration`, sys_user0.`middle_name`, sys_user0.`sys_updated_on`, sys_user0.`u_default_group`, sys_user0.`country`, sys_user0.`last_login`, sys_user0.`user_name`, sys_user0.`time_zone`, sys_user0.`failed_attempts`, sys_user0.`email`, sys_user0.`company`, sys_user0.`last_name`, sys_user0.`active`, sys_user0.`user_password`, sys_user0.`introduction`, sys_user0.`edu_status`, sys_user0.`department`, sys_user0.`state`, sys_user0.`password_needs_reset`, sys_user0.`sys_created_on`, sys_user0.`cost_center`, sys_user0.`mobile_phone`, sys_user0.`title`, sys_user0.`ldap_server`, sys_user0.`u_college`, sys_user0.`sys_updated_by`, sys_user0.`name`, sys_user0.`date_format`, sys_user0.`notification`, sys_user0.`last_login_device`, sys_user0.`zip`, sys_user0.`building`, sys_user0.`last_login_time`, sys_user0.`u_service_contract`, sys_user0.`sys_id`, sys_user0.`u_known_as`, sys_user0.`default_perspective`, sys_user0.`last_password`, sys_user0.`photo`, sys_user0.`sys_created_by`, sys_user0.`accumulated_roles`, sys_user0.`schedule`, sys_user0.`u_facit`, sys_user0.`source`, sys_user0.`sys_class_name`, sys_user0.`u_school`, sys_user0.`home_phone`, sys_user0.`time_format`, sys_user0.`preferred_language` FROM sys_user sys_user0  WHERE sys_user0.`sys_id` = '0d68d4b60194ac0094adf4b82250a697'
Time: 0:00:01.415 id: yale_1[glide.27] for: UPDATE sys_user  SET `sys_updated_by` = 'db692-admin', `locked_out` = 0, `sys_updated_on` = '2013-08-20 18:00:14', `sys_mod_count` = 109 WHERE sys_user.`sys_id` = 'b842d0f60114ac0094adf4b82250a687'
Time: 0:00:02.085 id: yale_1[glide.10] for: UPDATE sys_user  SET `sys_updated_by` = 'db692-admin', `locked_out` = 0, `sys_updated_on` = '2013-08-20 18:00:15', `sys_mod_count` = 5 WHERE sys_user.`sys_id` = '19bee72ad8d46c007ac0638b5167dcc6'
Time: 0:00:01.464 id: yale_1[glide.2] for: UPDATE sys_user  SET `sys_updated_by` = 'db692-admin', `locked_out` = 0, `sys_updated_on` = '2013-08-20 18:00:18', `sys_mod_count` = 6 WHERE sys_user.`sys_id` = '577d58ba01d4ac0094adf4b82250a615'
[0:00:00.034] Compacting large row block
[0:00:00.001] Expanding large row block
*** Script: counter is: 11921