Search
Duplicate
โ˜•

fetch_size vs batch_size

hibernate.jdbc.fetch_size

> In the first case, hibernate.jdbc.fetch_size sets the statement's fetch size within the JDBC driver, that is the number of rows fetched when there is more than a one row result on select statements. In the second case, hibernate.jdbc.batch_size determines the number of updates (inserts, updates and deletes) that are sent to the database at one time for execution.
โ€ข
fetch_sizeย ๋Š” result ๊ฐ€ ์—ฌ๋Ÿฌ๊ฐœ์ผ ๋•Œ, ํ•œ ๋ฒˆ์— ์ฝ์–ด์˜ฌ row ์ˆ˜์ด๋‹ค(๋‹จ,MySQL์€ ํ•ญ์ƒ ์ „์ฒด ๋ฐ์ดํ„ฐ๋ฅผ ํ•œ๋ฐฉ์— ์ฝ๋Š”๋‹ค๊ณ ํ•จ. TBD)

hibernate.jdbc.batch_size

โ€ข
batch_sizeย ๋Š” update(insert,update,delete) ์‹œ์— ๋ฌถ์–ด์„œ ์š”์ฒญํ•  ๊ฐฏ์ˆ˜์ด๋‹ค.
โ€ข
์ด ๋•Œ sequence ๊ธฐ๋ฐ˜์œผ๋กœ ID๋ฅผ ์ƒ์„ฑํ•œ๋‹ค๋ฉด, sequence ์˜ increment_size ๋„ ๋™์ผํ•˜๊ฒŒ ๋งž์ถฐ์ฃผ๋Š”๊ฒŒ ์ข‹๋‹ค.
์ถœ์ฒ˜: