. .

smalltalk

Reusing Column Buffers with Oracle and VW: Video

April 30, 2010 6:49:39.586

Today's Smalltalk Daily looks at reusing column buffers with Oracle (version 9 and up) with VisualWorks. This is an upcoming feature of VisualWorks, scheduled for VW 7.7.1. If you're looking for a particular topic, you can find it with the Media Search application on our site.

The code used is below; To watch, click on the viewer:


"Connect to an Oracle database."
conn := OracleConnection new.
conn username: 'username';
password: 'password';
environment: 'ORACLEDB'.
conn connect.

sess := conn getSession.

"The default is false meaning not to reuse."
sess reuseColumnBuffers: false.

t1 := Time millisecondsToRun:[
       " | conn sess ansStrm |"
     100 timesRepeat: [
		sess prepare:  'select * from sys.all_tables where TABLE_NAME=''DUAL'''.
		sess execute.
		ansStrm := sess answer.
		res := ansStrm upToEnd.
	].
].
Transcript cr; show: 'Time spent without reusing row buffers: ', t1 asFloat printString.

"Set to reuse the column buffers."
sess reuseColumnBuffers: true.

t2 := Time millisecondsToRun:[
       " | conn sess ansStrm |"
     100 timesRepeat: [
		sess prepare:  'select * from sys.all_tables where TABLE_NAME=''DUAL'''.
		sess execute.
		ansStrm := sess answer.
		res := ansStrm upToEnd.
	].
].
Transcript cr; show: 'Time spent with reusing row buffers: ', t2 asFloat printString.


You can download the video directly here. If you like this kind of video, why not subscribe to "Smalltalk Daily"?

Technorati Tags: , , , ,

posted by James Robertson

 Share Tweet This