Aman Khan | Data Engineering (@amankhan_data) header
Aman Khan | Data Engineering (@amankhan_data) profile picture

Research Intern · Ex-Data Engineer @ Infosys · Now MSc AI @ BTU Cottbus. Pipelines, warehousing, and what's underneath the SQL

Berlin, Germany
Joined May 2017
Photo by Aman Khan | Data Engineering (@amankhan_data)Photo by Aman Khan | Data Engineering (@amankhan_data)Photo by Aman Khan | Data Engineering (@amankhan_data)Photo by Aman Khan | Data Engineering (@amankhan_data)Photo by Aman Khan | Data Engineering (@amankhan_data)Photo by Aman Khan | Data Engineering (@amankhan_data)Photo by Aman Khan | Data Engineering (@amankhan_data)Photo by Aman Khan | Data Engineering (@amankhan_data)Photo by Aman Khan | Data Engineering (@amankhan_data)Photo by Aman Khan | Data Engineering (@amankhan_data)
wrapped up my data warehouse project: a star schema pulling sales from 3 branch dbs into one model, loaded with an etl i wrote in oracle pl/sql. deduped ~47k customer records, turned 35 duplicate products into the real 29. diagram + repo below. github.com/aman7kh8an6/drink… #Data #DWH
3
142
The title "Hist-Tree: Those Who Ignore It Are Doomed to Learn" is one of the best paper titles in databases, and the paper backs it up.
In 2018, a paper made a wild claim: a B-Tree is just a model. It takes a key and predicts a position. So why not replace it with a neural net? In 2021, another paper answered: “Those who ignore it are doomed to learn.” I presented that one in my MSc seminar. Here’s the fight🧵
1
17
In 2018, a paper made a wild claim: a B-Tree is just a model. It takes a key and predicts a position. So why not replace it with a neural net? In 2021, another paper answered: “Those who ignore it are doomed to learn.” I presented that one in my MSc seminar. Here’s the fight🧵
1
1
2
113
4/ In its comparison it goes up against 3 learned indexes: RMI (Kraska’s), the PGM-index, and RadixSpline. My takeaway: sometimes "ML beats data structures" really means "we hadn’t tried hard enough with data structures."
1
8
5/ Which side am I on? I think both papers made the field better. But "try the simple baseline first" is the lesson I keep coming back to, in research and in production.
3
Curious: how many of you have built a system from scratch to understand how it works underneath? Not just used a database, but built a tiny one. Not just used an HTTP server, but implemented one. Not just used a cache, but built one.
1
30
In Oracle, when a row grows and no longer fits its block, the row moves — but the ROWID doesn't. The old block keeps a stub pointing to the new location. No index breaks. You just pay an extra I/O on every read of that row until the table is reorganized. Small storage detail.
2
65
1/ For 3 years I wrote SQL against Oracle. ROWID was just there useful, reliable, never in the way. That's what a good abstraction does. You never need to look underneath it I looked underneath it. Its the thing that makes indexes possible How a database actually stores a row:
1
99
8/Postgres can't do that. MVCC means an UPDATE writes a new row version. If it lands on a different page, every index pointing at the old TID gets rewritten. Escape hatch: HOT — new version fits on the same page, no index touched. Prevention knob: fillfactor.
1
8
9/Two engines. Two architectures. Same advice: leave empty space in the page now, so updates don't relocate later. PCTFREE and fillfactor are same knob. I'd used one and read about the other and never connected them — because I learned both as settings instead of consequences.
5
"Data chaos" isn't messy data. It's this chain: You store the same fact in many places (redundancy) → they drift apart (inconsistency) → and your question needs all of them at once (distribution) The scary part isn't wrong answers. It's plausible wrong answers. #data #dwh
2
59