Last week we talked about the different ways we can decompose a simple predicate which is a conjunction of two simpler predicates.

Given the query:

SELECT * FROM ab WHERE a = 7 AND b = 100

We can:

  • Not decompose the filter at all, and scan our base data applying the predicate a = 7 AND b = 100,
  • push down the a = 7 filter and translate the scan over the primary index into a scan on a secondary index, then apply the b = 100 filter on the results of that, or
  • do the same with the b = 100 filter and use a = 7 as our residual filter.

Algebraically these options might look something like:

Option 1

(filter (and (= a 7) (= b 100)) (scan ab PRIMARY))

Option 2

(filter (= b 100)...

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help