HackerTrans
TopNewTrendsCommentsPastAskShowJobs

foldU

no profile record

Submissions

From hand-tuned Go to self-optimizing code: Building BitsEvolve

datadoghq.com
11 points·by foldU·10 tháng trước·0 comments

[untitled]

1 points·by foldU·năm ngoái·0 comments

How to Understand That Jepsen Report

buttondown.com
4 points·by foldU·năm ngoái·0 comments

Automating the Blue Prince Parlor Puzzle

buttondown.com
2 points·by foldU·năm ngoái·0 comments

Propositional Parlor Puzzle

buttondown.com
27 points·by foldU·năm ngoái·4 comments

Darts, Dice, and Coins: Sampling from a Discrete Distribution (2011)

keithschwarz.com
3 points·by foldU·năm ngoái·0 comments

It's Time to Stop Building KV Databases

buttondown.com
65 points·by foldU·năm ngoái·62 comments

[untitled]

1 points·by foldU·2 năm trước·0 comments

Thoughts on DuckDB's Grammar Patching Thing

buttondown.com
34 points·by foldU·2 năm trước·3 comments

Fine, I'll Play With Skiplists

buttondown.com
120 points·by foldU·2 năm trước·15 comments

Fine! I'll Play with Skiplists

buttondown.com
2 points·by foldU·2 năm trước·0 comments

Integrity Constraints and the Relational Derivative

buttondown.com
1 points·by foldU·2 năm trước·0 comments

TPC-See?

buttondown.email
2 points·by foldU·2 năm trước·0 comments

A Charming Algorithm for Count-Distinct

justinjaffray.com
24 points·by foldU·2 năm trước·1 comments

A Card Counting Trick

buttondown.email
2 points·by foldU·2 năm trước·0 comments

My First Distributed System

buttondown.email
2 points·by foldU·2 năm trước·0 comments

A Sniff Test for Some Query Optimizers

buttondown.email
2 points·by foldU·2 năm trước·0 comments

The Little Planner Chapter 4: A Pushdown Party

buttondown.email
1 points·by foldU·3 năm trước·0 comments

The Little Planner Chapter 4: A Pushdown Party

buttondown.email
4 points·by foldU·3 năm trước·0 comments

SQL Scoping Is Surprisingly Subtle and Semantic

buttondown.email
2 points·by foldU·3 năm trước·0 comments

comments

foldU
·3 tháng trước·discuss
This sounds like a really unpleasant shopping experience to me.
foldU
·4 tháng trước·discuss
The geometric representation of AM/GM is very cool, but the first animation seems wrong to me, it should be varying the value of `b`, not the location of the circle, for it to make sense, no?
foldU
·10 tháng trước·discuss
I don’t mean to suggest it’s not sleazy—I think it’s sleazy by default. VC writing is not to be trusted.
foldU
·10 tháng trước·discuss
I don't think a post on a VC blog of all places should be considered "journalism"
foldU
·năm ngoái·discuss
This is correct, I appreciate you for putting it so coherently :). I think I didn’t make it clear enough in the piece that I’m coming from a stance of fast access being table stakes, and the question being about how that’s accomplished.
foldU
·năm ngoái·discuss
he addresses this, you simply get airline pilots to pick them
foldU
·năm ngoái·discuss
Yes, it’s good
foldU
·2 năm trước·discuss
whoops! thank you!
foldU
·2 năm trước·discuss
(author of OP) That post of yours was actually what got me tooling around with this stuff again :) it's a really excellent one
foldU
·2 năm trước·discuss
You also don't really have to worry about convergence, since these are formal power series.
foldU
·2 năm trước·discuss
More deserves to be written on the ILP idea, I haven't actually tried to make it work but it seems to me like the only real direction to optimize ("optimize" used in the mathematical sense, rather than the programming sense) queries that you can't just exploit the principle of optimality on (see this earlier article I wrote [1] for a bit more exposition). I think maybe some of the egg [2] people have experimented with this.

Speaking from experience, there's lots of rewrites you'd want to do in a query optimizer that having access to efficient DAG-shaped query plans would make tenable, but as a specific example they are an important part of doing full subquery decorrelation [3].

[1] https://buttondown.email/jaffray/archive/why-are-query-plans...

[2] https://egraphs-good.github.io/

[3] https://www.scattered-thoughts.net/writing/materialize-decor...
foldU
·3 năm trước·discuss
Ah my apologies, I wasn't familiar with that syntax.
foldU
·3 năm trước·discuss
I think this one is obvious actually! There's no choice but to aggregate it at the level of the `xx` `SELECT`, no other level has access to the `x` column.
foldU
·3 năm trước·discuss
(I'm the author of the original post [1]) And while I think the rules, in the end, make sense, I think it's not quite as clear cut as you describe, consider:

    SELECT (SELECT sum(1) FROM xx LIMIT 1) FROM aa;
which returns

    3
    3
    3
Personally, I think having the inner aggregation always attach to the nearest `SELECT` would have been an equally valid way of defining how this works, but it just so happens it is not defined that way.

[1]: https://buttondown.email/jaffray/archive/sql-scoping-is-surp...
foldU
·3 năm trước·discuss
I agree, I think the original sin here is the fact that whether a `SELECT` is an aggregation is determined by the contents of the scalar expressions at all. I think most of this weirdness comes directly out of wanting to be able to write both `SELECT sum(x) FROM xx` and `SELECT x FROM xx` and have them work.

Not that I have a better solution offhand, in SQL grouping by a constant value is not actually the same as not writing `GROUP BY` at all since the behaviour on empty tables is different.
foldU
·3 năm trước·discuss
I had not heard of this term but it sounds like the same thing!
foldU
·3 năm trước·discuss
whoops embarrassing. thank you for pointing that out!
foldU
·3 năm trước·discuss
I had no idea, thanks!
foldU
·3 năm trước·discuss
You are correct! I will fix it when I get home, thank you for the correction!