1 of 61

Relational Memory:

Native In-Memory Accesses on Rows and Columns

Shahin Roozkhosh

Denis Hoornaert

Ju Hyoung Mun

Tarikul Islam Papon

Ahmed Sanaullah

Ulrich Drepper

Renato Mancuso

Manos Athanassoulis

2 of 61

Data Layouts

row-stores

column-stores

2

3 of 61

Data Layouts

row-stores

column-stores

3

Transactional

4 of 61

Data Layouts

row-stores

column-stores

4

Analytical

5 of 61

Adaptive layout

5

row store

queries accessing �the entire rows

E.g., H2O (ACM SIGMOD, 2014), HyPer (IEEE ICDE , 2011), Peloton (ACM SIGMOD, 2016), OctopusDB (CIDR, 2011)

6 of 61

Adaptive layout

6

row store

column store

multiple copies of data with different layouts

queries accessing �the entire rows

queries accessing�some of columns

→ complexity ↑�less scalable

E.g., H2O (ACM SIGMOD, 2014), HyPer (IEEE ICDE , 2011), Peloton (ACM SIGMOD, 2016), OctopusDB (CIDR, 2011)

7 of 61

How can we access �only the desired columns�without storing or maintainingmultiple copies of data?

7

a novel hardware design 

for data transformation

Relational Memory

8 of 61

PS-PL �Platforms

8

DRAM

CPU

Processing System

UltraScale+

Programmable

Logic

Any logic can be programmed!

9 of 61

Relational �Memory �Engine

9

DRAM

Programmable

Logic

CPU

Processing System

10 of 61

Relational �Memory �Engine

10

DRAM

On-the-fly �vertical�partitioning

CPU

Processing System

11 of 61

Relational �Memory �Engine

11

DRAM

On-the-fly �vertical�partitioning

CPU

Processing System

Q1: how to build?

Q2: how to use?

12 of 61

ephemeral variable

a simple, lightweight programming abstraction

to use Relational Memory

12

struct row table[ ];

leads to normal memory accesses

[[ephemeral]] struct col_group cg[ ];

fake address that CPU thinks it exists

intercepted by RME

13 of 61

13

CPU

base row store

name

ID

age

height

weight

Alice

1

10

120

34

Bob

2

71

175

74

Charles

3

37

168

61

David

4

25

179

80

struct row {

string name;

int ID ;

int age ;

int height ;

int weight ;

};

ephemeral variable

Not instantiated in main memory

name

height

weight

Alice

120

34

Bob

175

74

Charles

168

61

David

179

80

optimal layout

[[ephemeral]] struct column_group cg[];

SELECT NAME

FROM table� WHERE weight/height>25;

struct column_group {

string NAME ;

int height ;

int weight ;

};

14 of 61

14

CPU

base row store

SELECT NAME

FROM table� WHERE weight/height>25;

name

ID

age

height

weight

Alice

1

10

120

34

Bob

2

71

175

74

Charles

3

37

168

61

David

4

25

179

80

name

height

weight

optimal layout

struct row {

string name;

int ID ;

int age ;

int height ;

int weight ;

};

Programmable logic

ephemeral variable

on-the-fly

data transformation

[[ephemeral]] struct column_group cg[];

15 of 61

15

CPU

base row store

SELECT NAME

FROM table� WHERE weight/height>25;

name

ID

age

height

weight

Alice

1

10

120

34

Bob

2

71

175

74

Charles

3

37

168

61

David

4

25

179

80

name

height

weight

Alice

120

34

Bob

175

74

Charles

168

61

David

179

80

optimal layout

ephemeral variable

struct row {

string name;

int ID ;

int age ;

int height ;

int weight ;

};

Programmable logic

[[ephemeral]] struct column_group cg[];

16 of 61

16

CPU

base row store

SELECT NAME

FROM table� WHERE weight/height>25;

name

ID

age

height

weight

Alice

1

10

120

34

Bob

2

71

175

74

Charles

3

37

168

61

David

4

25

179

80

name

height

weight

Alice

120

34

Bob

175

74

Charles

168

61

David

179

80

optimal layout

ephemeral variable

[[ephemeral]] struct column_group cg[];

struct column_group {

string NAME ;

int height ;

int weight ;

};

17 of 61

17

CPU

base row store

name

ID

age

height

weight

Alice

1

10

120

34

Bob

2

71

175

74

Charles

3

37

168

61

David

4

25

179

80

ID

age

1

10

2

71

3

37

4

25

optimal layout

ephemeral variable

struct row {

string name;

int ID ;

int age ;

int height ;

int weight ;

};

struct column_group {

string ID ;

int age;

};

SELECT ID FROM table

WHERE age>40;

  • Transparent data transformation

  • Optimal layout

[[ephemeral]] struct column_group cg[];

18 of 61

Relational �Memory �Engine

18

DRAM

On-the-fly �vertical�partitioning

CPU

Processing System

Q1: how to build?

Q2: how to use?

19 of 61

Relational Memory Engine

19

Core

Trapper

Monitor-

Bypass

Fetch-Unit

Requestor

Main Memory (DRAM)

Processing System

Data�Buffer

Metadata Buffer

Programmable logic

Core

Core

Core

Processing System

20 of 61

Relational Memory Engine

20

Core

Trapper

Monitor-

Bypass

Fetch-Unit

Requestor

Main Memory (DRAM)

Processing System

Programmable logic

Core

Core

Core

Processing System

Intercepts CPU-oriented memory requests

Data�Buffer

Metadata Buffer

21 of 61

Relational Memory Engine

21

Core

Trapper

Monitor-

Bypass

Fetch-Unit

Requestor

Main Memory (DRAM)

Processing System

Core

Core

Core

Processing System

Monitors the completion of each reorganized cache line

Data�Buffer

Metadata Buffer

Programmable logic

22 of 61

Relational Memory Engine

22

Core

Trapper

Monitor-

Bypass

Fetch-Unit

Requestor

Main Memory (DRAM)

Processing System

Programmable logic

Core

Core

Core

Processing System

Orchestrates accesses to main memory

using DB geometry

Data�Buffer

Metadata Buffer

23 of 61

Relational Memory Engine

23

Core

Trapper

Monitor-

Bypass

Fetch-Unit

Requestor

Main Memory (DRAM)

Processing System

Programmable logic

Core

Core

Core

Processing System

Retrieves data from main memory

Data�Buffer

Metadata Buffer

24 of 61

Relational Memory Engine

24

PL

Core

Trapper

Monitor-

Bypass

Fetch-Unit

Requestor

Main Memory (DRAM)

Data�Buffer

Metadata Buffer

000000000000A0A0A0A0A0A0

A0A0A0A00000000000000000

000000000000000000000000

0000000000000000A1A1A1A1

A1A1A1A1A1A1000000000000

000000000000000000000000

00000000000000000000A2A2

A2A2A2A2A2A2A2A200000000

000000000000000000000000

000000000000000000000000

A3A3A3A3A3A3A3A3A3A30000

000000000000000000000000

000000000000000000000000

0000A4A4A4A4A4A4A4A4A4A4

000000000000000000000000

000000000000000000000000

0000AEAEAEAEAEAEAEAEAEAE

RME gets

DB geometry

row size, row count, �# columns, columns widths, column offsets

useful data

useless data

Bus Width

PS

PL

PS

Core

Core

Core

25 of 61

Relational Memory Engine

25

PL

Core

Trapper

Monitor-

Bypass

Fetch-Unit

Requestor

Main Memory (DRAM)

Core

Core

Core

Data�Buffer

Metadata Buffer

000000000000A0A0A0A0A0A0

A0A0A0A00000000000000000

000000000000000000000000

0000000000000000A1A1A1A1

A1A1A1A1A1A1000000000000

000000000000000000000000

00000000000000000000A2A2

A2A2A2A2A2A2A2A200000000

000000000000000000000000

000000000000000000000000

A3A3A3A3A3A3A3A3A3A30000

000000000000000000000000

000000000000000000000000

0000A4A4A4A4A4A4A4A4A4A4

000000000000000000000000

000000000000000000000000

0000AEAEAEAEAEAEAEAEAEAE

useful data

useless data

Bus Width

PS

PL

PS

Read accesses towards ephemeral variable

26 of 61

Relational Memory Engine

26

PL

Core

Trapper

Monitor-

Bypass

Fetch-Unit

Requestor

Main Memory (DRAM)

Core

Core

Core

Data�Buffer

Metadata Buffer

000000000000A0A0A0A0A0A0

A0A0A0A00000000000000000

000000000000000000000000

0000000000000000A1A1A1A1

A1A1A1A1A1A1000000000000

000000000000000000000000

00000000000000000000A2A2

A2A2A2A2A2A2A2A200000000

000000000000000000000000

000000000000000000000000

A3A3A3A3A3A3A3A3A3A30000

000000000000000000000000

000000000000000000000000

0000A4A4A4A4A4A4A4A4A4A4

000000000000000000000000

000000000000000000000000

0000AEAEAEAEAEAEAEAEAEAE

useful data

useless data

Bus Width

PS

PL

PS

Trapper notifies the MB about the access

27 of 61

Relational Memory Engine

27

PL

Core

Trapper

Monitor-

Bypass

Fetch-Unit

Requestor

Main Memory (DRAM)

Core

Core

Core

Data�Buffer

Metadata Buffer

000000000000A0A0A0A0A0A0

A0A0A0A00000000000000000

000000000000000000000000

0000000000000000A1A1A1A1

A1A1A1A1A1A1000000000000

000000000000000000000000

00000000000000000000A2A2

A2A2A2A2A2A2A2A200000000

000000000000000000000000

000000000000000000000000

A3A3A3A3A3A3A3A3A3A30000

000000000000000000000000

000000000000000000000000

0000A4A4A4A4A4A4A4A4A4A4

000000000000000000000000

000000000000000000000000

0000AEAEAEAEAEAEAEAEAEAE

useful data

useless data

Bus Width

PS

PL

PS

MB checks the corresponding Metadata

28 of 61

Relational Memory Engine

28

PL

Core

Trapper

Monitor-

Bypass

Fetch-Unit

Requestor

Main Memory (DRAM)

Core

Core

Core

Data�Buffer

Metadata Buffer

000000000000A0A0A0A0A0A0

A0A0A0A00000000000000000

000000000000000000000000

0000000000000000A1A1A1A1

A1A1A1A1A1A1000000000000

000000000000000000000000

00000000000000000000A2A2

A2A2A2A2A2A2A2A200000000

000000000000000000000000

000000000000000000000000

A3A3A3A3A3A3A3A3A3A30000

000000000000000000000000

000000000000000000000000

0000A4A4A4A4A4A4A4A4A4A4

000000000000000000000000

000000000000000000000000

0000AEAEAEAEAEAEAEAEAEAE

useful data

useless data

Bus Width

PS

PL

PS

When the data is not in Data Buffer

MB notifies the Requestor about the missing data

29 of 61

Relational Memory Engine

29

PL

Core

Trapper

Monitor-

Bypass

Fetch-Unit

Requestor

Main Memory (DRAM)

Core

Core

Core

Data�Buffer

Metadata Buffer

000000000000A0A0A0A0A0A0

A0A0A0A00000000000000000

000000000000000000000000

0000000000000000A1A1A1A1

A1A1A1A1A1A1000000000000

000000000000000000000000

00000000000000000000A2A2

A2A2A2A2A2A2A2A200000000

000000000000000000000000

000000000000000000000000

A3A3A3A3A3A3A3A3A3A30000

000000000000000000000000

000000000000000000000000

0000A4A4A4A4A4A4A4A4A4A4

000000000000000000000000

000000000000000000000000

0000AEAEAEAEAEAEAEAEAEAE

useful data

useless data

Bus Width

PS

PL

PS

When the data is not in Data Buffer

Requestor programs the Fetch-Unit and it fires the read request toward the DRAM

30 of 61

Relational Memory Engine

30

PL

Core

Trapper

Monitor-

Bypass

Fetch-Unit

Requestor

Main Memory (DRAM)

Core

Core

Core

Data�Buffer

Metadata Buffer

000000000000A0A0A0A0A0A0

A0A0A0A00000000000000000

000000000000000000000000

0000000000000000A1A1A1A1

A1A1A1A1A1A1000000000000

000000000000000000000000

00000000000000000000A2A2

A2A2A2A2A2A2A2A200000000

000000000000000000000000

000000000000000000000000

A3A3A3A3A3A3A3A3A3A30000

000000000000000000000000

000000000000000000000000

0000A4A4A4A4A4A4A4A4A4A4

000000000000000000000000

000000000000000000000000

0000AEAEAEAEAEAEAEAEAEAE

useful data

useless data

Bus Width

PS

PL

PS

When the data is not in Data Buufer

0000000000A0A0A0A0A0A0

Fetch-Unit

Column-Extractor

Reader

000000000000A0A0A0A0A0A0

A0A0A0A0A0A0

31 of 61

Relational Memory Engine

31

PL

Core

Trapper

Monitor-

Bypass

Fetch-Unit

Requestor

Main Memory (DRAM)

Core

Core

Core

Data�Buffer

Metadata Buffer

000000000000A0A0A0A0A0A0

A0A0A0A00000000000000000

000000000000000000000000

0000000000000000A1A1A1A1

A1A1A1A1A1A1000000000000

000000000000000000000000

00000000000000000000A2A2

A2A2A2A2A2A2A2A200000000

000000000000000000000000

000000000000000000000000

A3A3A3A3A3A3A3A3A3A30000

000000000000000000000000

000000000000000000000000

0000A4A4A4A4A4A4A4A4A4A4

000000000000000000000000

000000000000000000000000

0000AEAEAEAEAEAEAEAEAEAE

useful data

useless data

Bus Width

PS

PL

PS

When the data is not in Data Buffer

Extracted Data being sent toward the (DATA) SPM and Metadate table gets updated

Extracted Data being sent toward the DATA and Metadate table gets updated

A0A0A0A0A0A0

32 of 61

Relational Memory Engine

32

PL

Core

Trapper

Monitor-

Bypass

Fetch-Unit

Requestor

Main Memory (DRAM)

Core

Core

Core

000000000000A0A0A0A0A0A0

A0A0A0A00000000000000000

000000000000000000000000

0000000000000000A1A1A1A1

A1A1A1A1A1A1000000000000

000000000000000000000000

00000000000000000000A2A2

A2A2A2A2A2A2A2A200000000

000000000000000000000000

000000000000000000000000

A3A3A3A3A3A3A3A3A3A30000

000000000000000000000000

000000000000000000000000

0000A4A4A4A4A4A4A4A4A4A4

000000000000000000000000

000000000000000000000000

0000AEAEAEAEAEAEAEAEAEAE

useful data

useless data

Bus Width

PS

PL

PS

A0A0A0A0A0A0A0A0A0A0A1A1�A1A1A1A1A1A1A1A1A2A2A2A2

A2A2A2A2A2A2A3A3A3A3A3A3

A3A3A3A3A4A4A4A4A4A4A4A4

A4A4A5A5A5A5A5A5A5A5A5A5

only the desired columns

When the data is not in Data Buffer

Data�Buffer

Metadata Buffer

Cache Line

33 of 61

Relational Memory Engine

33

PL

Core

Trapper

Monitor-

Bypass

Fetch-Unit

Requestor

Main Memory (DRAM)

Core

Core

Core

Data�Buffer

Metadata Buffer

000000000000A0A0A0A0A0A0

A0A0A0A00000000000000000

000000000000000000000000

0000000000000000A1A1A1A1

A1A1A1A1A1A1000000000000

000000000000000000000000

00000000000000000000A2A2

A2A2A2A2A2A2A2A200000000

000000000000000000000000

000000000000000000000000

A3A3A3A3A3A3A3A3A3A30000

000000000000000000000000

000000000000000000000000

0000A4A4A4A4A4A4A4A4A4A4

000000000000000000000000

000000000000000000000000

0000AEAEAEAEAEAEAEAEAEAE

A0A0A0A0A0A0A0A0A0A0A1A1�A1A1A1A1A1A1A1A1A2A2A2A2

A2A2A2A2A2A2A3A3A3A3A3A3

A3A3A3A3A4A4A4A4A4A4A4A4

A4A4A5A5A5A5A5A5A5A5A5A5

Cache Line

useful data

useless data

Bus Width

PS

PL

PS

Upon availability, MB receives back the ID and Offset

When the data is already in Data Buffer

34 of 61

Relational Memory Engine

34

PL

Core

Trapper

Monitor-

Bypass

Fetch-Unit

Requestor

Main Memory (DRAM)

Core

Core

Core

Data�Buffer

Metadata Buffer

000000000000A0A0A0A0A0A0

A0A0A0A00000000000000000

000000000000000000000000

0000000000000000A1A1A1A1

A1A1A1A1A1A1000000000000

000000000000000000000000

00000000000000000000A2A2

A2A2A2A2A2A2A2A200000000

000000000000000000000000

000000000000000000000000

A3A3A3A3A3A3A3A3A3A30000

000000000000000000000000

000000000000000000000000

0000A4A4A4A4A4A4A4A4A4A4

000000000000000000000000

000000000000000000000000

0000AEAEAEAEAEAEAEAEAEAE

A0A0A0A0A0A0A0A0A0A0A1A1�A1A1A1A1A1A1A1A1A2A2A2A2

A2A2A2A2A2A2A3A3A3A3A3A3

A3A3A3A3A4A4A4A4A4A4A4A4

A4A4A5A5A5A5A5A5A5A5A5A5

Cache Line

useful data

useless data

Bus Width

PS

PL

PS

Trapper gets notified by MB and fetches the Data from Data Buffer  

When the data is already in Data Buffer

35 of 61

Relational Memory Engine

35

Core

Trapper

Monitor-

Bypass

Requestor

Main Memory (DRAM)

Processing System

Programmable logic

Core

Core

Core

Processing System

Data�Buffer

Metadata Buffer

Fetch-Unit

2MB << Data size

36 of 61

Target Platform

36

UltraScale+

ZCU102 platform

    • CPUs :  4x ARM Cortex-A53 
          • L1/L2 Cache :  32+32KB I+D / 1 MB
    • PS Frequency :  1.5 GHz
    • PL Frequency :  100MHz

Resources

Utilization (%)

LUT

2.78

FF

0.68

DSP

0.08

BRAM

60.69

area utilization less than 3%

37 of 61

Relational Memory Benchmark

37

Q1: SELECT A1 , A2 , ... , Ak FROM S;

Q2: SELECT A1 , A2 , ... , Ak FROM S WHERE C1, C2, … ,Ci;

Q3: SELECT AVG (A1) FROM S WHERE A3 < k GROUP BY A2;

Q4: SELECT S.A1 , R.A3 FROM S JOIN R ON S.A2 = R.A2;

projection

both projection & selection

group by

Approach tested

ROW : Direct row-wise access

COL   : Direct columnar access

RME  : using Relational Memory Engine

join over two tables

Processing System

Slow FPGA (100MHz)

38 of 61

Queries Varying Projectivity

Q1: SELECT A1 , A2 , ... , Ak FROM S;

38

Row size: 64 Bytes, Column size: 4 Bytes

39 of 61

Queries Varying Projectivity

Q1: SELECT A1 , A2 , ... , Ak FROM S;

39

Row size: 64 Bytes, Column size: 4 Bytes

tuple reconstruction cost

prefetcher supports up to four parallel streams

40 of 61

Queries Varying Projectivity

Q1: SELECT A1 , A2 , ... , Ak FROM S;

40

Row size: 64 Bytes, Column size: 4 Bytes

RME provides stable performance irrespectively of projectivity

RME close to COL

for low projectivity

RME >> faster than COL

for high projectivity

41 of 61

RME for Multiple Selection and Projection Attributes

Q3: SELECT A1 , A2 , ... , Ak FROM S WHERE C1, C2, … ,Ci;

41

Row size: 64 Bytes, Column size: 4 Bytes

RME vs COL

42 of 61

RME for Multiple Selection and Projection Attributes

Q3: SELECT A1 , A2 , ... , Ak FROM S WHERE C1, C2, … ,Ci;

42

Row size: 64 Bytes, Column size: 4 Bytes

RME can be up to 2.23× faster than columnar access

RME vs COL

RME vs ROW

RME always outperforms row access by being 1.3 − 1.5× faster

COL faster

43 of 61

Group by

43

Q4: SELECT AVG (A1) FROM S WHERE A3 < k GROUP BY A2;

Selectivity: 10%

RME outperforms both ROW and COL

Column size: 4 Bytes

44 of 61

Join Over Two Tables

Column size: 4 Bytes

44

Q4: SELECT S.A1 , R.A3 FROM S JOIN R ON S.A2 = R.A2;

RME reduces data movement �up to 41% 

CPU

Data

45 of 61

RME Scales with Data Size

TPC-H Q1

TPC-H Q6

45

CPU-bound (sort, group by)

IO-bound

46 of 61

RME Scales with Data Size

TPC-H Q1

TPC-H Q6

46

CPU overhead dominates �data movement cost

RME benefits regardless of data size

CPU-bound (sort, group by)

IO-bound

47 of 61

Summary

  • Relational Memory
    • a novel SW/HW co-design paradigm
    • every query always has access to the optimal data layout
  • ephemeral variables
    • a simple and lightweight abstraction to use RM

47

  • Relational Memory
    • a novel SW/HW co-design paradigm
    • every query always has access to the optimal data layout

DRAM

RME

CPU

  • Relational Memory enables opportunities for innovation across the data system architecture. 

Relational Fabric, ICDE ‘23

48 of 61

Future Work

48

Data Transformation for ML workloads

Matrix and tensor slicing

Integrating  with Real DBMS

Exploring query optimization 

DRAM Controller Augmentation

Utilizing bank interleaving and parallelism

49 of 61

Thank you

Ju Hyoung Mun ( jmun@bu.edu )

49

50 of 61

Thank you

Ju Hyoung Mun ( jmun@bu.edu )

50

51 of 61

How big is the overhead of fetching the data?

RME Cold vs. Hot

RME is comparable with directly accessing a single column!

RME Cold has virtually the same performance as RME Hot!

SELECT A1, A3, A5 FROM S;

Row size: 64 Bytes

52 of 61

Updates

52

Can we perform updates through ephemeral variables?

How to cater for HTAP workloads?

No, ephemeral variables are read-only, but …

… RME can manage timestamps, allowing MVCC

Updates go to base row-oriented data (invalidated old/add new version of row)

In flight-queries will always read correct data (MVCC)

53 of 61

Updates - Example

53

name

ID

age

height

weight

Alice

1

10

120

34

Bob

2

71

175

74

Charles

3

37

168

61

David

4

25

179

80

Eve

5

43

168

58

Frank

6

22

181

79

Greg

7

52

175

67

Henry

8

17

169

76

Iris

9

34

158

49

Jane

10

29

165

59

Kenneth

11

31

184

94

Luke

12

13

125

38

54 of 61

Updates - Example

54

name

ID

age

height

weight

TSfrom

TSto

Alice

1

10

120

34

t1

Bob

2

71

175

74

t1

Charles

3

37

168

61

t1

David

4

25

179

80

t1

Eve

5

43

168

58

t1

Frank

6

22

181

79

t1

Greg

7

52

175

67

t1

Henry

8

17

169

76

t2

Iris

9

34

158

49

t2

Jane

10

29

165

59

t2

Kenneth

11

31

184

94

t2

Luke

12

13

125

38

t2

DELETE FROM table WHERE ID = 11;

At t3:

Data inserted at time t1 and now valid

Data inserted at time t2 and now valid

55 of 61

Updates - Example

55

name

ID

age

height

weight

TSfrom

TSto

Alice

1

10

120

34

t1

Bob

2

71

175

74

t1

Charles

3

37

168

61

t1

David

4

25

179

80

t1

Eve

5

43

168

58

t1

Frank

6

22

181

79

t1

Greg

7

52

175

67

t1

Henry

8

17

169

76

t2

Iris

9

34

158

49

t2

Jane

10

29

165

59

t2

Kenneth

11

31

184

94

t2

t3

Luke

12

13

125

38

t2

UPDATE weight=82 FROM table WHERE ID = 8;

At t5:

DELETE FROM table WHERE ID = 11;

At t3:

56 of 61

Updates - Example

56

name

ID

age

height

weight

TSfrom

TSto

Alice

1

10

120

34

t1

Bob

2

71

175

74

t1

Charles

3

37

168

61

t1

David

4

25

179

80

t1

Eve

5

43

168

58

t1

Frank

6

22

181

79

t1

Greg

7

52

175

67

t1

Henry

8

17

169

76

t2

t5

Iris

9

34

158

49

t2

Jane

10

29

165

59

t2

Kenneth

11

31

184

94

t2

t3

Luke

12

13

125

38

t2

Henry

8

17

169

82

t5

UPDATE weight=82 FROM table WHERE ID = 8;

At t5:

DELETE FROM table WHERE ID = 11;

At t3:

57 of 61

Updates - Example

57

name

ID

age

height

weight

TSfrom

TSto

Alice

1

10

120

34

t1

Bob

2

71

175

74

t1

Charles

3

37

168

61

t1

David

4

25

179

80

t1

Eve

5

43

168

58

t1

Frank

6

22

181

79

t1

Greg

7

52

175

67

t1

Henry

8

17

169

76

t2

t5

Iris

9

34

158

49

t2

Jane

10

29

165

59

t2

Kenneth

11

31

184

94

t2

t3

Luke

12

13

125

38

t2

Henry

8

17

169

82

t5

SELECT avg(weight) FROM table;

At t3:

At t5:

cg1 = configure (table, column_group, t3);

cg1 = configure (table, column_group, t5);

RME will discard through hardware invalid rows

With MVCC enabled, RME is always faster than ROW and COL!

58 of 61

Data Compression

58

How do we support compression?

Relational Memory natively supports

dictionary and delta (frame of reference) encoding

to exploit dictionary encoding

59 of 61

RME Scales with Data Size

TPC-H Q1

SELECT l_returnflag, l_linestatus,� SUM(l_quantity), SUM(l_extendedprice),� SUM(l_extendedprice*(1-l_discount)),� SUM(l_extendedprice*(1-l_discount)*(1+l_tax)),� AVG(l_quantity), AVG(l_extendedprice), � AVG(l_discount),� COUNT(*)�FROM lineitemWHEREl_shipdate <= '1998-12-01' - '[DELTA]' day (3)

GROUP BY l_returnflag, l_linestatus

ORDER BY l_returnflag, l_linestatus;

TPC-H Q6

SELECT� SUM(l_extendedprice*l_discount)

FROM lineitem

WHERE

l_shipdate >= '[DATE]’ and� l_shipdate < '[DATE]' + 1 year and� l_discount > [DISCOUNT] - 0.01 and � l_discount < [DISCOUNT] + 0.01 and� l_quantity < [QUANTITY];

59

Selectivity: 95%, projectivity: 24%

Selectivity: 15%, projectivity: 18%

60 of 61

60

61 of 61

Architecture of Programmable Logic

61

Look Up Table

Flip Flop

CLB

CLB

CLB

CLB

CLB

CLB

CLB

CLB

CLB

IOB

IOB

IOB

IOB

IOB

IOB

IOB

IOB

IOB

IOB

IOB

IOB

SM

SM

SM

SM

Any logic can be programmed!

Configurable Logic Block

Switch Matrix

(Programmable Interconnect)