15
GemStone/S Indexed Collection Primer Dale Henrichs GemTalk Systems ESUG 2014

GemStone/S Indexed Collection Primer

  • Upload
    esug

  • View
    132

  • Download
    1

Embed Size (px)

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.

Citation preview

Page 1: GemStone/S Indexed Collection Primer

GemStone/S Indexed Collection Primer

Dale Henrichs GemTalk Systems

ESUG 2014

Page 2: GemStone/S Indexed Collection Primer

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

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

Query derived from select expression

Page 5: GemStone/S Indexed Collection Primer

Query Predicates

Page 6: GemStone/S Indexed Collection Primer

Query variable binding and execution

Page 7: GemStone/S Indexed Collection Primer

Index derived from Query

Page 8: GemStone/S Indexed Collection Primer

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

Additional Path Terms and Operators

Page 10: GemStone/S Indexed Collection Primer

Index Options

Page 11: GemStone/S Indexed Collection Primer

Query Evaluation Options

Page 12: GemStone/S Indexed Collection Primer

Query Object Model

Page 13: GemStone/S Indexed Collection Primer

GsDevKit Tutorial

Page 14: GemStone/S Indexed Collection Primer

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

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