OODB Storage Options and Performance
David Shaffer
cdshaffer at acm.org
Tue Apr 12 22:40:10 UTC 2005
Daniel Salama wrote:
> The GOODS code looked like this:
>
> time:= Time millisecondsToRun:
> [Transcript cr..
> db := KKDatabase onHost: 'localhost' port: 6100.
> db root at: 'Sequences' put: (Dictionary new).
> db commit.
> base := db root at: 'Sequences'.
> nextCustomerNo := base at: 'CustomerNo' ifAbsent: [0].
> [0 to: 999 do:
> [:i|
> (i \\ 100) = 0 ifTrue: [Transcript show: '.'].
> nextCustomerNo := nextCustomerNo + 1.
> base at: 'CustomerNo' put: nextCustomerNo.
> db commit]] ensure: [db logout]].
>
> Transcript cr; show: (time/1000) asFloat; show: ' seconds'.
>
> db := KKDatabase onHost: 'localhost' port: 6100.
> base := db root at: 'Sequences'.
> Transcript cr; show: 'Last Customer No: '; show: (base at:
> 'CustomerNo').
> db logout.
>
>
Daniel,
Would you mind re-running the above test with a BTree instead of a
Dictionary as the root? I'm just curious if it has any impact.
David
More information about the Squeak-dev
mailing list
|