发信人: Beijing (学什么都不如有绿卡), 信区: Database
标 题: Re: 请教。Toad for oracle setting. first 500 or whole table!
发信站: BBS 未名空间站 (Wed Mar 12 15:55:11 2008)
What is the OCI Buffer Array Size option for in the View - Options - Oracle
- General section?
After a SELECT query is executed, we must retrieve the rows from the Oracle
server to your PC. We do not retrieve the rows all at once, nor do we
retrieve them one at a time (unless there is a LONG or LOB column involved).
We retrieve the rows in blocks. The number of rows retrieved in each block
is the number of rows you specify with "OCI Array Buffer Size". TOAD
defaults to 25 because SQL*Plus defaults to 25. In my opinion, an optimal
setting is more like 500 or 1000. Here is why: If your dataset has 1,000
rows, and your OCI Array Buffer size is set to 25, then TOAD has to make 40
(that's 1000 / 25) round trips across the network to retrieve all of the
rows. So you can immediately see why 500 or 1000 is better. The only
disadvantage to a higher setting of OCI Array Buffer Size is that TOAD must
allocate memory to hold that many rows prior to each fetch. If that many
rows are actually fetched, there is no loss. On the other hand, if not that
many rows are retrieved, then we allocated some memory that is not going to
be released until the cursor is freed. Luckily, this is a trivial amout of
memory, in the grand scheme of things.
【 在 scimitar (无限江山) 的大作中提到: 】
: Anyone has the experience with Toad for Oracle?
: I used to do lots of "select * from ****". It sounds everytime toad give
: back first 500 and will read more if I scrolled down. Since there is an
: obvious delay, I thought toad only read first 500 records.
: Today I got message from DBA. He told me my toad tried to download whole
: table and used up the memory.
: Anyone know the default setting of toad. whether it only read first 500
: records or the whole table?
: Thank a lot.
2. 听不得人说Vivian Chow长得不美
※ 来源:·WWW 未名空间站 海外: mitbbs.com 中国: mitbbs.cn·[FROM: 64.242.]