|
You proved me wrong on one point. I thought arraysize was strictly the number of rows the server process reads out of buffer cache at a time. Looks like it's more complicated than that. The documentation says "[arraysize] Sets the number of rows--called a batch--that SQL*Plus will fetch from the database at one time". I guess they need to add the word "approximate" to it.
I don't know your Oracle version. On my 9.0.1.3.1 on Windows XP using 8k db_block_size and creating a table like yours (create table t (a char(2000))), I get this result:
arraysize - consistent gets
1 - 72
2 - 72
3 - 72
4 - 56
5 - 52
6 - 56
7 - 49
8 - 48
9 - 50
10 - 46
11 - 45
12 - 48
Yours apparently is different:
1 - 71
2 - 71
3 - 67
4 - 55
5 - 51
By the way, my old thinking was 100 consistent reads for 100 rows, not 300, regardless how many times the same block is read. I still believe with improper array size, most blocks are read more than once. Consistent gets are the count of reads on buffer cache, not PGA. There must be some prefetch in sqlplus behind the scenes, as you said. But that doesn't change the definition of consistent gets.
Yong Huang |
|