Skip to main content
added 1 character in body
Source Link
nhahtdh
  • 56.6k
  • 15
  • 129
  • 164

posiblePossible explanations:

a) Java is doing nothing, while Oracle is computing the first 1000 rows instead of first 10.

  1. Java is doing nothing, while Oracle is computing the first 1000 rows instead of first 10.

  2. Oracle is doing nothing, while Java is computing the last 1000 rows instead of last 10.

  3. Communication protocols (e.g. TCP/IP) wait a lot and then must handle more data at once, but the peak data transfer will be throttled down by hardware limits. This is countered by protocol's overhead, so there should be optimal fetch size and anything less or more would be slower ;))

  4. It would get worse if the process of fetching is synchronous with other Java code, so that Java asks for more rows only after processing the previous data and Oracle does nothing in the mean time.

b) Oracle is doing nothing, while Java is computing the last 1000 rows instead of last 10.

Imagine there are 3 people:

c) Communication protocols (e.g. TCP/IP) wait a lot and then must handle more data at once, but the peak data transfer will be throttled down by hardware limits. This is countered by protocol's overhead, so there should be optimal fetch size and anything less or more would be slower ;))

  • 1st one folds A4 paper in half
  • 2nd one brings stacks of folded paper from one room to another
  • 3rd cuts some shape from the folded paper.

d) It would get worse if the process of fetching is synchronous with other Java code, so that Java asks for more rows only after processing the previous data and Oracle does nothing in the mean time.

How big should the stacks be, if the 1st one has to wait until the 2nd one returns and the 2nd one has to wait until the 3rd one finishes their job?

Imagine there are 3 people:
 1st one folds A4 paper in half
 2nd one brings stacks of folded paper from one room to another
 3rd cuts some shape from the folded paper.
How big should the stacks be, if the 1st one has to wait until the 2nd one
returns and the 2nd one has to wait until the 3rd one finishes their job?

Stacks of 1000 will not be better than stacks of 10 i guess ;))

Stacks of 1000 will not be better than stacks of 10 i guess ;))

posible explanations:

a) Java is doing nothing, while Oracle is computing the first 1000 rows instead of first 10.

b) Oracle is doing nothing, while Java is computing the last 1000 rows instead of last 10.

c) Communication protocols (e.g. TCP/IP) wait a lot and then must handle more data at once, but the peak data transfer will be throttled down by hardware limits. This is countered by protocol's overhead, so there should be optimal fetch size and anything less or more would be slower ;))

d) It would get worse if the process of fetching is synchronous with other Java code, so that Java asks for more rows only after processing the previous data and Oracle does nothing in the mean time.

Imagine there are 3 people:
 1st one folds A4 paper in half
 2nd one brings stacks of folded paper from one room to another
 3rd cuts some shape from the folded paper.
How big should the stacks be, if the 1st one has to wait until the 2nd one
returns and the 2nd one has to wait until the 3rd one finishes their job?

Stacks of 1000 will not be better than stacks of 10 i guess ;))

Possible explanations:

  1. Java is doing nothing, while Oracle is computing the first 1000 rows instead of first 10.

  2. Oracle is doing nothing, while Java is computing the last 1000 rows instead of last 10.

  3. Communication protocols (e.g. TCP/IP) wait a lot and then must handle more data at once, but the peak data transfer will be throttled down by hardware limits. This is countered by protocol's overhead, so there should be optimal fetch size and anything less or more would be slower ;))

  4. It would get worse if the process of fetching is synchronous with other Java code, so that Java asks for more rows only after processing the previous data and Oracle does nothing in the mean time.

Imagine there are 3 people:

  • 1st one folds A4 paper in half
  • 2nd one brings stacks of folded paper from one room to another
  • 3rd cuts some shape from the folded paper.

How big should the stacks be, if the 1st one has to wait until the 2nd one returns and the 2nd one has to wait until the 3rd one finishes their job?

Stacks of 1000 will not be better than stacks of 10 i guess ;))

Bounty Ended with 100 reputation awarded by daveslab
Source Link
Aprillion
  • 22.1k
  • 5
  • 56
  • 91

posible explanations:

a) Java is doing nothing, while Oracle is computing the first 1000 rows instead of first 10.

b) Oracle is doing nothing, while Java is computing the last 1000 rows instead of last 10.

c) Communication protocols (e.g. TCP/IP) wait a lot and then must handle more data at once, but the peak data transfer will be throttled down by hardware limits. This is countered by protocol's overhead, so there should be optimal fetch size and anything less or more would be slower ;))

d) It would get worse if the process of fetching is synchronous with other Java code, so that Java asks for more rows only after processing the previous data and Oracle does nothing in the mean time.

Imagine there are 3 people:
 1st one folds A4 paper in half
 2nd one brings stacks of folded paper from one room to another
 3rd cuts some shape from the folded paper.
How big should the stacks be, if the 1st one has to wait until the 2nd one
returns and the 2nd one has to wait until the 3rd one finishes their job?

Stacks of 1000 will not be better than stacks of 10 i guess ;))