Skip to content

Instantly share code, notes, and snippets.

@lechten
Last active November 15, 2019 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lechten/97f07fac4adc9b7b6bca593cc0da2eef to your computer and use it in GitHub Desktop.
Save lechten/97f07fac4adc9b7b6bca593cc0da2eef to your computer and use it in GitHub Desktop.
Query processing example for slides with the The Complete Book
-- Data from query optimization slides by Hector Garcia-Moline at http://infolab.stanford.edu/~hector/cs245/notes.htm
-- To be used with RelaX: https://dbis-uibk.github.io/relax/calc.htm
-- https://dbis-uibk.github.io/relax/calc.htm?data=gist:97f07fac4adc9b7b6bca593cc0da2eef
group: query evaluation plan example
description[[More or less random data.]]
R = { A, B, C
a 1 10
b 1 20
c 2 10
d 2 35
e 3 45
}
S = { C, D, E
10 x 2
20 y 2
30 z 2
40 x 1
50 y 3
}
SampleQuery =
pi B, D (
sigma A = 'c' and E = 2 and C = C2 (
R x (rho C->C2 S)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment