gemstone/s indexed collection primer
DESCRIPTION
Title: GemStone/S Indexed Collection Primer Speaker: Dale Henrichs Thu, August 21, 12:00pm – 12:30pm Video Part1: https://www.youtube.com/watch?v=XvLFwJfn-uQ Video Part2: https://www.youtube.com/watch?v=wd_b0k3732I Abstract: GemStone/S indexes provide a way to locate specific objects in a collection by value. Indexing a Collection creates internal structures such as balanced trees (Btrees). Only a few message sends are needed to lookup a value or range of values in the indexing structures. When collections are indexed, they can return results without having to iterate the collection or send messages to each object. In this talk Dale will provide a detailed overview of the capabilities of GemStone/S indexes. Bio: Dale Henrichs has been working in Smalltalk since 1985 when he developed an internal application on the Tektronix 4404. The internal application was used at Tektronix for at least 25 years and may still be in use today! Since 1985 he has been lucky enough to work in Smalltalk nearly full-time, spending the last 15 years at GemStone give or take a couple of years.TRANSCRIPT
![Page 1: GemStone/S Indexed Collection Primer](https://reader033.vdocuments.mx/reader033/viewer/2022052900/555bde86d8b42a38078b484c/html5/thumbnails/1.jpg)
GemStone/S Indexed Collection Primer
Dale Henrichs GemTalk Systems
ESUG 2014
![Page 2: GemStone/S Indexed Collection Primer](https://reader033.vdocuments.mx/reader033/viewer/2022052900/555bde86d8b42a38078b484c/html5/thumbnails/2.jpg)
Why Indexes?
Efficient Query Execution!1.6M element population (8300 element result set): 3800ms - select block query 10ms - indexed query
![Page 3: GemStone/S Indexed Collection Primer](https://reader033.vdocuments.mx/reader033/viewer/2022052900/555bde86d8b42a38078b484c/html5/thumbnails/3.jpg)
GemStone/S Indexes
!
• Indexes are built against UnorderedCollections
• Indexes are based on the instance variables of the objects in the collection.
• Indexes are automatically updated when instance variables are changed
• Indexes use B-trees for efficient equality-based lookup
![Page 4: GemStone/S Indexed Collection Primer](https://reader033.vdocuments.mx/reader033/viewer/2022052900/555bde86d8b42a38078b484c/html5/thumbnails/4.jpg)
Query derived from select expression
![Page 5: GemStone/S Indexed Collection Primer](https://reader033.vdocuments.mx/reader033/viewer/2022052900/555bde86d8b42a38078b484c/html5/thumbnails/5.jpg)
Query Predicates
![Page 6: GemStone/S Indexed Collection Primer](https://reader033.vdocuments.mx/reader033/viewer/2022052900/555bde86d8b42a38078b484c/html5/thumbnails/6.jpg)
Query variable binding and execution
![Page 7: GemStone/S Indexed Collection Primer](https://reader033.vdocuments.mx/reader033/viewer/2022052900/555bde86d8b42a38078b484c/html5/thumbnails/7.jpg)
Index derived from Query
![Page 8: GemStone/S Indexed Collection Primer](https://reader033.vdocuments.mx/reader033/viewer/2022052900/555bde86d8b42a38078b484c/html5/thumbnails/8.jpg)
Last ElementClass
• Expected class of last element in path term
• Any class that responds to comparison messages (< > <= >= = ~=) can be used
• “Basic” Classes cache representative values in B-tree and are restricted to #isKindOf:.
![Page 9: GemStone/S Indexed Collection Primer](https://reader033.vdocuments.mx/reader033/viewer/2022052900/555bde86d8b42a38078b484c/html5/thumbnails/9.jpg)
Additional Path Terms and Operators
![Page 10: GemStone/S Indexed Collection Primer](https://reader033.vdocuments.mx/reader033/viewer/2022052900/555bde86d8b42a38078b484c/html5/thumbnails/10.jpg)
Index Options
![Page 11: GemStone/S Indexed Collection Primer](https://reader033.vdocuments.mx/reader033/viewer/2022052900/555bde86d8b42a38078b484c/html5/thumbnails/11.jpg)
Query Evaluation Options
![Page 12: GemStone/S Indexed Collection Primer](https://reader033.vdocuments.mx/reader033/viewer/2022052900/555bde86d8b42a38078b484c/html5/thumbnails/12.jpg)
Query Object Model
![Page 13: GemStone/S Indexed Collection Primer](https://reader033.vdocuments.mx/reader033/viewer/2022052900/555bde86d8b42a38078b484c/html5/thumbnails/13.jpg)
GsDevKit Tutorial
![Page 14: GemStone/S Indexed Collection Primer](https://reader033.vdocuments.mx/reader033/viewer/2022052900/555bde86d8b42a38078b484c/html5/thumbnails/14.jpg)
Futures
• We intend to open source the Query API and implementation
• Hasso Plattner Institut Senior project to port the Query API to Squeak
![Page 15: GemStone/S Indexed Collection Primer](https://reader033.vdocuments.mx/reader033/viewer/2022052900/555bde86d8b42a38078b484c/html5/thumbnails/15.jpg)
Resources
• GemTalk Systems
• http://gemtalksystems.com/
• GsDevKit GitHub project
• https://github.com/GsDevKit/gsDevKitHome#open-source-development-kit-for-gemstones-64-bit-
• GsDevKit Indexing tutorial (mail me for availability of tutorial)
• https://github.com/GsDevKit/gsDevKitHome/projects/indexSample/README.md#index-sample