Hi, all,

I am trying to gather query's run-time statistics using RMS command 'get 
statistics'. It works fine, but I have some questions below:

As I understand, RMS will save stats for a given query in shared memory, so it 
cannot save all the history. It only save CURRENT running queries' stats. Is 
this true?
For a long-running query, I can start another session using 'get statistics for 
qid xxx ' to periodically get the stats. For short-running query (finish in 
ms), it seems hard for me to start another session find out qid and run the 
'get statistics'. I think there is a small time window that one can still get 
stats for a query after it finished.
What is that time window, 30 seconds?


If I have a busy system with TPS like 3000 queries/s, can RMS save all of them 
by 30 seconds? That seems huge, and memory is limited. If it works like a ring 
buffer or cache (aging out oldest entries), what is the strategy RMS keep stats 
or aging who out?
What will happen if all active queries will run out of RMS memory? I know we 
can enlarge the size of that memory, but not know exact how, any instructions?
With the instruction, how can one calculate the required memory size if s/he 
know how many queries s/he want to save.

Maybe we can only save stats for 'slow queries'?

Many questions, thanks in advance for any help.

Thanks,
Ming

Reply via email to