Subject Is it safe to execute SET STATISTICS INDEX on a busy database?
Author fernnaj
Hello,

I have some questions about the procedure described in the FAQ 167 (What is index selectivity?).

I have a database which is being used more or less constantly and usually has several transactions running in parallel at any given moment.

Is it safe to execute SET STATISTICS INDEX on such a database? Would any running transaction be blocked because of this command? Would this command be blocked because of any running transaction?

And just out of curiosity, what would happen with active transactions when this command is executed? Would they pick the new statistics or use the old ones?

Thanks in advance,

Fernando Nájera