cancel
Showing results for 
Search instead for 
Did you mean: 

update statistics and table access

Former Member
0 Kudos

----------

Adaptive Server Enterprise/15.7.0/EBF 22639 SMP SP52 /P/Sun_svr4/OS 5.10/ase157sp5x/3293/64-bit/FBO/Wed May 21 02:49:14 2014

----------

Hi Community,

I'd like to know if it's allowed to run update statistics on day-time while people are connected to the system? or is it better to do it when there are no activities on the DB?

From my point of view if people just do some selects, the update statistics can be executed.

On the other, does 'update statistics' apply an exclusive lock?

Thank you

Simon

Accepted Solutions (1)

Accepted Solutions (1)

former_member188958
Active Contributor
0 Kudos

This manual page discusses the locks held by various forms of the update statistics command: Types of Scans Performed During update statistics

-bret

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks Bret and Jeroen

Simon

jayrijnbergen
Active Participant
0 Kudos

update statistics will usually be run when there's minimal other activity going on

if you do need to run something during the day, you can minimize impact in several ways

- specify table + index name, or table + partition name

- use datachange() function to see if update stats is required

- use sampling

- if you're on latest patch level on 15.7 or 16.0 use hashing (though there are some issues with hashing, so maybe better not to use it if you're not on latest patch level)